Remove "Featured Image" from showing up in gallery as well.

Viewing 8 posts - 1 through 8 (of 8 total)
  • #3823

    Can I remove the featured image from showing up in the gallery? I only want the featured image to show up in the main page slider, and have different images in the gallery.

    Any help would be much appreciated. Thanks!


    Upload the picture you want to use as the featured image by going to Media > Libraray > Add New then click to add the featured image and select the photo from the media library. That will make the photo appear on your homepage but not in your gallery.


    My pictures are already uploaded into the media library (through the gallery post)
    and chosen as featured image. They still show up on both.


    I want to remove the pics from my posts too (not all, but some) and I can’t. An answer to this would be useful please Daniel


    Note: The following PHP code should be added to your theme’s .php template file(s) rather than in the WYSIWYG editor:


    // get the post's thumbnail ID so this code can be used inside OR outside the 'loop'
    $the_thumbnail_id = get_post_thumbnail_id($post->ID);
    // display the gallery (exclugin the thumbnail)
    $gallery_shortcode = '[gallery exclude="'.$the_thumbnail_id.'" id="' . intval( $post->ID ) . '" link = "file" size="tiny" columns="6"]';
    // *Note usage of additional options for Gallery Shortcode, as per:
    echo apply_filters( 'the_content', $gallery_shortcode );


    Hope this helps you out!
    Terran Orletsky
    Earthman Web & Media

    Daniel Tara

    Open content-gallery.php and remove the reference to the_post_thumbnail();


    Removing that line removes the thumbnail but does not change the fact that the image posts twice. I’m still trying to figure this out too.


    If you upgrade to 3.5 and edit the gallery, you will have the option to delete from the images from the gallery without removing the desired image from the “Featured Image” on the post. This fixed the issue for me.

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.