OceanWP child theme
If you can't find any good positions with OceanWP settings, then follow this tutorial.
This documentation can help you put a slider under the top menu of the OceanWP theme.
- 1
-
Go to the FTP of your website and create a child folder
/wp-content/themes/oceanwp-child-theme/
- 2
-
Create a style.css file in this folder
/wp-content/themes/oceanwp-child-theme/style.css
and write this code in it:
/* Theme Name: OceanWP child theme Template: oceanwp */ @import url('../oceanwp/style.css');
- 3
-
Copy the header.php file from OceanWP into your folder
From:
/wp-content/themes/oceanwp/header.php
To:
/wp-content/themes/oceanwp-child-theme/header.php
- 4
-
Modify the code
This is how the end of the code looks like:
<?php do_action( 'ocean_header' ); ?> <?php do_action( 'ocean_before_main' ); ?> <main id="main" class="site-main clr"<?php oceanwp_schema_markup( 'main' ); ?>> <?php do_action( 'ocean_page_header' ); ?>
Use our slider's shortcode under the header part:
<?php do_action( 'ocean_header' ); ?> <?php echo do_shortcode('[smartslider3 slider=315]'); ?> <?php do_action( 'ocean_before_main' ); ?> <main id="main" class="site-main clr"<?php oceanwp_schema_markup( 'main' ); ?>> <?php do_action( 'ocean_page_header' ); ?>
- 5
-
Activate your child theme