• Hi there. I am trying to use a featured image for the post, but not have that show up in the gallery of that post (so they can have different dimensions).

    I see that there is an exclude parameter I can’t figure out how to make it work. I’m not fully sure where to find the ID that is supposed to be excluded. I am using the theme Imbalance which recommends the cleaner gallery plugin. But I can tell if the cleaner gallery plugin is even activating properly.

    Here is my site: https://sarahwhitelive.com/category/modeling
    On this page you see the featured images. If you click any thumb but the first and you will see the post with the gallery. In the those galleries I want to be able to exclude the featured post image.

    Thanks very much for any advice!

Viewing 11 replies - 1 through 11 (of 11 total)
  • sarah:

    i’m using imbalance as well with cleaner gallery…having major trouble doing what you describe as well as trying to get the thumbnails to link to ANYTHING besides a slightly larger version of the image within the post. nothing seems to allow linking to either an attachment page or to the original file itself.

    i’ve toggled all of the settings both on the cleaner gallery admin settings page and within individual gallery pages. i’ve literally tried every combination i can think of of settings…i’ve selected multiple different lightbox scripts from the pulldown menu. nothing.

    unfortunately, i don’t think we can install another gallery plugin to use for posts due to imbalance’s reliance on the “featured image” aspect that is linked up with the theme’s rollover post function.

    i’ve checked the imbalance theme’s comment thread…no answers there. the one thing i haven’t done is pay the $25 for the theme hybrid support forums..which i would do if i thought i would get the answer i’m seeking. just doesn’t make sense that the simple settings don’t work.

    any help anyone can provide would be greatly appreciated.

    Thread Starter sarahwhite

    (@sarahwhite-1)

    hey there – i ended up paying a coder friend of mine to fix this and i don’t know what he did. all i know is it had to be hardcoded into the galleria component because shortcode exclusion doesn’t work for featured images. but i don’t know what that code is… do let me know if you find out! best of luck.

    Thread Starter sarahwhite

    (@sarahwhite-1)

    You could try uploading through the media gallery instead of selecting files from your computer. Does that do anything for you?

    sarah:

    i posted a comment over on the imbalance theme page and a user gave me a tip that broke the logjam. it was pretty easy actually. i had also neglected to actually upload a gallery script (e.g. Lightbox or other), so that was another issue…but the comment helped me realize i hadn’t covered that part of it yet.

    i ended up using Floatbox, which is pretty nice and elegant, though i’m having some issues getting some of the configuration options to show now. anyway, if you’re interested, you can see an example of how it’s working here: https://www.betterthanone.net/?p=77

    method of upload wasn’t the issue; see below…i’ve excerpted the comment that helped me out on the wpshower site.

    i sincerely appreciate your follow-up though! and your photos are absolutely lovely, i have to say. i might have solved my issue sooner if i hadn’t gotten sidetracked on your site. ??

    cheers.
    ____________________________
    (comment from https://wpshower.com/free-wordpress-themes/imbalance-free-wordpress-theme/#comment-3228)

    Litmus,
    I had the same problem with this theme but think I found a way around it. Go to the theme options section and click on the box to disable jquery gallery. Then go to the Cleaner gallery options and you can modify the default gallery settings as you want. I use Lightbox so I had to select lightbox for the external image script and i also checked the box saying Load the Cleaner Gallery Style Sheet and mine works now. Hope that helps.

    Thread Starter sarahwhite

    (@sarahwhite-1)

    Litmus – great, thanks for following up with the info. Good to know, and glad you enjoyed my photos ?? Your site looks great, and I agree that Floatbox is a nice plugin.

    Sarah

    The best solution I found is a function –>
    https://stackoverflow.com/questions/4337999/wordpress-exclude-the-post-thumbnail-from-gallery-shortcode

    Thanks to TheDeadMedic !

    Is there a way to prevent just the image from appearing when you hover over the gallery thumbnail? It looks terrible but i like the way the post title and text appears. Is there a good work around for this? I would like an easier way to link to the large picture and post.

    In answer to the original question, you can pass attachment IDs to the gallery by through an exclure parameter, i’ve posted a blog on how to do it:

    https://creativebinge.co.uk/blog/wordpress-excluding-featured-image-from-gallery/

    or here is the code (placed within a single-post) file:


    < ?php echo do_shortcode('[gallery size="full size" exclude="' . get_post_thumbnail_id( $post->ID ) . '"]'); ?>

    I’m also having this same problem on my blog as you can see in one article here:
    https://123blogg.com/hvordan-sette-opp-akismet-i-wordpress/
    Is there any easier way than go into code and edit this?

    Where should this code be pasted?:

    < ?php echo do_shortcode(‘[gallery size="full size" exclude="' . get_post_thumbnail_id( $post->ID ) . '"]‘); ?>

    ops. didn’t work yet..

    in this page got the code who works perfectly

    https://stackoverflow.com/questions/4337999/wordpress-exclude-the-post-thumbnail-from-gallery-shortcode?s=2f43d758-b828-448a-8aa4-0423cc5f6342

    this is the code

    [Code moderated as per the Forum Rules. Please use the pastebin]

    this one goes on the functions.php

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Exclude featured image from gallery’ is closed to new replies.