Show gallery only if has content
-
Hi, I need to show que thumbnail image if the gallery is empty, and the gallery if it has content.
I’ve tried with this:
function portfolio_image() { if( function_exists( 'easy_image_gallery' ) ) { echo easy_image_gallery(); }else{ echo '<div class="portfolio-image">'. genesis_get_image( array( 'size' => 'portfolio_entry' ) ) . '</div>'; } } add_action( 'genesis_after_entry_content', 'portfolio_image' );But it gets the gallery when has content, and nothing when hasn’t.
Any help please?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Show gallery only if has content’ is closed to new replies.