Last active
December 19, 2015 17:08
-
-
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
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
<?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