Last active
December 17, 2018 09:53
-
-
Save stuartduff/cf565cc72aace857f5727b389b124bb4 to your computer and use it in GitHub Desktop.
Storefront Homepage Full Width WooSlider
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
/** | |
* Adds wooslider into the storefront_before_content action in the parent themes header.php file. | |
*/ | |
function sd_storefront_homepage_slider() { | |
// if not the StoreFront Homepage Page Template return false | |
if ( ! is_page_template( 'template-homepage.php' ) ) { | |
return false; | |
} | |
// Output the WooSlider Shortcode via the do_shortcode() function. | |
echo do_shortcode( '[wooslider slide_page="homepage" slider_type="slides" layout="text-bottom" overlay="full" thumbnails="default" display_title="true" imageslide="true" order="DESC" order_by="date"]' ); | |
} | |
add_action( 'storefront_before_content', 'sd_storefront_homepage_slider', 5 ); |
Author
stuartduff
commented
Dec 17, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment