Skip to content

Instantly share code, notes, and snippets.

@stuartduff
Last active December 17, 2018 09:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stuartduff/cf565cc72aace857f5727b389b124bb4 to your computer and use it in GitHub Desktop.
Save stuartduff/cf565cc72aace857f5727b389b124bb4 to your computer and use it in GitHub Desktop.
Storefront Homepage Full Width WooSlider
/**
* 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 );
@stuartduff
Copy link
Author

 .page-template-template-homepage .wooslider {
 	border: none;
 	box-shadow: none;
 	margin: 0;
 	padding: 0;
 }

.page-template-template-homepage .wooslider .slide-content {
 	margin: 0;
 	padding: 0;
 }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment