Forked from mikeyarce/storefront-full-width-slider.php
Created
June 24, 2017 00:43
-
-
Save the-nerdery-dot-info/5d3044658be69a62ce87bfe445b010f6 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