Remove PHP code if is_page
-
Hi,
how can i remove this code from page (is_page)?<?php if ( get_field('gallery') ): ?> <?php $image_ids = get_field('gallery', false, false); $shortcode = '[photomosaic ids="' . implode(',', $image_ids) . '"]'; echo do_shortcode( $shortcode ); ?> <?php endif; ?>
I try this but doesnt work:
<?php if ( is_single() ) { <?php if ( get_field('gallery') ): ?> <?php $image_ids = get_field('gallery', false, false); $shortcode = '[photomosaic ids="' . implode(',', $image_ids) . '"]'; echo do_shortcode( $shortcode ); ?> <?php endif; ?> } ?>
Thanks.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Remove PHP code if is_page’ is closed to new replies.