Skip to content

Instantly share code, notes, and snippets.

@amdrew
Last active December 19, 2015 17:08
Show Gist options
  • Save amdrew/5988696 to your computer and use it in GitHub Desktop.
Save amdrew/5988696 to your computer and use it in GitHub Desktop.
Add Easy Image Gallery just before the content (and after the featured image) on Shop Front single download pages. Paste into functions.php
<?php
function my_theme_easy_image_gallery() {
// return if we're not on a single download page
if ( ! is_singular( 'download' ) )
return;
// stop it appending to the end of the gallery automatically
remove_filter( 'the_content', 'easy_image_gallery_append_to_content' );
// output gallery
if( function_exists( 'easy_image_gallery' ) ) {
echo easy_image_gallery();
}
}
add_action( 'shopfront_single_before_content', 'my_theme_easy_image_gallery' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment