Last active
June 24, 2017 00:43
-
-
Save mikeyarce/da8e8127a56202200e4cfc0cda55c2a2 to your computer and use it in GitHub Desktop.
Add a full-width slider to Storefront (meta slider in example)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Don't copy this opening PHP tag if your file already has one. That breaks things. | |
<?php | |
function marce_slider_before_storefront_content () { | |
// If the template is not the homepage (template-homepage.php), don't display. | |
if ( ! is_page_template( 'template-homepage.php' ) ) { | |
return false; | |
} | |
// If it is the homepage, add this meta slider shortcode | |
echo do_shortcode( '[metaslider id=586]'); | |
} | |
add_action('storefront_before_content |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment