Removing an image from a gallery but keeping it in the post with the gallery

  • Author
    Posts
  • #532377

    mmcportfolio
    Member

    Hi,

    I’m currently using WordPress to create a portfolio and am having a bit if a problem with the gallery function. The structure I am using for the portfolio is a post per project and within that post I am inserting one large (main) image from the project and the rest of the images in a gallery below the large image. The problem is that when I insert an image into the post (not into the gallery) it automatically appears in the gallery so i have the main image appearing in the post and in the gallery which I don’t want. You can see this occurring on the post titled ‘Footwear Design; Urban Eco Street Sandal, Pentland Brands – London’. When i then delete it from the gallery it deletes it from the post and from my media library so the image is gone completely.

    On the second post titled ‘Concept Generation; Theft Prevention Products for Travellers, Middlex Uni – London’ this problem hasn’t occurred and I can’t work out how i did it.

    My blogs url is: http://mmcportfolio.wordpress.com/. Please let me know if there is a solution to this conundrum.

    Many thanks.

    Matt.

    The blog I need help with is mmcportfolio.wordpress.com.

    #532528

    westi
    Staff

    If you want to exclude a particular image from the gallery then you can do this by adding the correct parameter to the shortcode:

    http://en.support.wordpress.com/images/gallery/#gallery-shortcode

    #532531

    mmcportfolio
    Member

    Thanks,

    I followed the link but it is not clear to me how I access the shortcode. I am relatively new to WordPress, how do I access the short code for my image?

    Thanks

    #532533

    timethief
    Member

    Please scroll down in the section westi linked to:

    * Note: To get an attachment ID for an image, go to your Media Library and hover over the image title you want to exclude. You can find the ID in the URL (the number after attachment_id=).
    Examples:
    [gallery id="402"]
    [gallery columns="5" orderby="title DESC, ID ASC"]

    #532540

    mmcportfolio
    Member

    I did see the attachment ID by hovering over the image but what I can’t work out is where do I go to add the correct parameter to the shortcode to remove the desired image from the gallery?

    #532544

    auxclass
    Member

    Switch the editor to html mode / view – then you should see something like [gallery] put the short code inside the [ brackets ]

    #532728

    mmcportfolio
    Member

    [gallery order="DESC" columns="6"]

    that is the short code for the gallery and the attachment ID for the image I would like to exclude is 31. So what do I enter into that short code and where do I put it?

    Many thanks.

    #532729

    auxclass
    Member

    Try:

    `[gallery order="DESC" columns="6" exclude="31"]

    #532730

    mmcportfolio
    Member

    That doesn’t seem to work.

    #532731

    auxclass
    Member

    My only guess is there is an order to things – try moving exclude up is my only guess:

    [gallery exclude="31" order="DESC" columns="6" ]

    This is what worked on a test site:

    [gallery exclude="589"]

    #532732

    mmcportfolio
    Member

    No combination is working. Very irritating. Thanks for the suggestions though everyone.

    #532740

    justjennifer
    Moderator

    Can you be a little more specific, since your blog is private, we can’t see the problem.

    You say you can see the excluded image in your Gallery. But where? On the front page of your blog, in the blog post itself? On an attachment page? If the problem is on an attachment page and you don’t want the thumbnail of the excluded image to appear in the navigation, try changing your Gallery settings to show images when clicked on rather than attachment pages.

    #532741

    mmcportfolio
    Member

    My blog is now no longer set to private. If you go down to the 4th post title ‘Night Pal; Childs Nightlight, Dezac – London’ you will see the main image there title ‘Concept 3 – Cry Reader’. Below this main image you can see the gallery in the same post and within the gallery is the main image again.

    This is the issue as I do not want the main image repeated in the gallery. You will notice that this problem has not occurred in the previous 2 posts with the same format but this is only an anomaly, if I got back into the gallery to update the info the main image will appear in the gallery.

    #532743

    mmcportfolio
    Member

    Also I should note that at this stage I do not have any pages, only the home page on which all content will be displayed.

    #532744

    justjennifer
    Moderator

    Can you copy that post’s gallery shortcode from the HTML editor and paste it here?

    #532745

    justjennifer
    Moderator

    About your last comment, each of those entries are Posts, which can be viewed individually.

    #532747

    mmcportfolio
    Member

    [gallery exclude="31" link="file" order="DESC" " columns="6"]

    Does that mean each post has its own url?

    #532750

    justjennifer
    Moderator

    There’s a misplaced quotation mark; try removing it.

    Yes. For example the Post with the problem Gallery is http://mmcportfolio.wordpress.com/2010/10/19/275/

    #532773

    mmcportfolio
    Member

    I removed the misplaced quotation mark so the code now looks like this:

    [gallery exclude="31" link="file" order="DESC" " columns="6"]

    Still hasn’t worked.

    #532774

    justjennifer
    Moderator

    [gallery columns="6" exclude="31"]

    Try starting with that only.

The topic ‘Removing an image from a gallery but keeping it in the post with the gallery’ is closed to new replies.