Exclude the_post_thumbnail from gallery shortcode
-
I am using this code to have a simple gallery on the page:
<?php echo do_shortcode('[gallery itemtag="ul" icontag="li" size="full" columns="0" link="file" ]'); ?>
The problem now is that the end-user has to upload an image via the Media page before selecting this image as featured image.
I know this could be solved by adding the featured image’s ID to the shortcode’s exclude list, but I dont have an idea to get this ID automatically.
- The topic ‘Exclude the_post_thumbnail from gallery shortcode’ is closed to new replies.