Managing a Gallery

  • Author
  • #306972


    I’ve been looking for the answer to this all day. If I’ve missed it, please point me in the right direction.

    I was wondering if it’s possible to do two things:

    1. Make the thumbnails in my gallery open up in a new window and

    2. Split the gallery up into different pages.

    I saw a thread where pana said that you could use the next page tag, but I don’t see how that’s possible considering my html editor only says [gallery] :(

    I launched my photo gallery today, and while I don’t really mind if I couldn’t make these changes, I would much rather them being able to be implimented.

    Please help and much thanks :)


    1. Haven’t found any way to do that.

    2. I don’t see that either; must have said it in connection with a group of independent images, not a gallery. Can you locate the thread?

    The way to have page splits would be using more than one galleries, with the next-page tag between them. In that case, all galleries except one must first be uploaded in other posts and transplanted using the post ID code.[*] So I don’t think it’s worth the trouble. And there seems to be a bug with the next-page tag anyway (I think we had noted that some time ago, and apparently it hasn’t been corrected): the page numbers won’t show in the front page, only when you view a single post.

    In all, the gallery feature is useful for fast uploading and basic batch processing of a group of images. If you want fancier handling, you’d better upload images the normal way.

    [*] Best info on galleries is here (by our justjennifer):



    :( :( :(

    Yeah, I’ve read that article.

    The problem is that I have hundreds of photos in my gallery, and every time someone clicks on an image, when they want to go back to the gallery it has to reload all over again. Not everyone thinks of opening each page in a separate window. I think this discourages people from viewing all my photos, as there is also no “Next Picture” link, or any navigation for that matter.

    And here’s the thread, although you may have been talking about separate images;


    Yes – it’s not clear I’m afraid but I was talking about independent images, because that’s what the OP had in his post. At some point I note this:

    You have posted your pictures as separate images, not as what is officially a WP “gallery”.

    As for the “Next Picture” link, are you aware of the fact that this is (unfortuntely) theme-dependent? With some themes you do get previous and next thumbnails below the main image displayed.



    Yeah, I read somewhere in some thread that MistyLook has it. Unfortunately that’s not good enough for me to want to change my theme; it took me a long time to pick my theme out.

    Sigh. If only.


    so i did a little coding and it’s not to hard but time consuming. just create a link button in the description part of the’s an example (<a href="" target="_self"> next </a>) the last part (p100526) is the page the next photo is on. you’ll also need a prev button and a gallery button. kind of basic looking but it works.


    @scapegoattattoo: Good idea! As a refinement, let me add that you can add table coding to have the “prev” tab aligned left and the “next” aligned right. And you can also use code for thumbnail links instead of text tabs.



    Lovely ideas! Could see where it might get a little maniacal if you have lots of photos in your gallery, but for the small stuff, really excellent.

    Faved this thread.


    Moderator Emeritus



    (Want me to present it in a more detailed and orderly fashion?)


    Moderator Emeritus

    Yes, please!



    Manually creating previous and next navigation tabs for gallery attachment pages

    1. For a text link, e.g. “Next”, the code would be:

    For a thumbnail link instead of the text tab, the code would be:
    <a href="URL_OF_NEXT_ATTACHMENT_PAGE_HERE"><img src="URL_OF_NEXT_IMAGE_HERE" width="100" /></a>

    (The width number is a suggestion – you can change it. The URL of an attachment page is the post URL plus the image name, without the “.jpg” part, folllowed by a slash.)

    2. You create these links, then create the following table code and paste it in the description box of the images:

    <table width="100%">
    <td align="left">LEFT_LINK_HERE</td>
    <td align="right">RIGHT_LINK_HERE</td>

    For the first and last images you can have a link with the appropriate text tab instead of “Previous” or “Next” (e.g. “Back to post”), or you can leave that part of the table code (the part shown in capitals) empty, if you want nothing instead.


    For a simpler alternative you can omit the table – just write this in the description boxes:

    <div> </div>

    (This way you get both tabs aligned left, the one below the other. Less work to do; but less elegant.)



    That wasn’t just faved, it was bookmarked! Thanks, pan!


    Moderator Emeritus

    It WORKS!!
    But tedious,
    and here’s a hint: name your pictures so you can read the titles, not just strings of numbers.



    @devblog: Thanks! (But the original idea was scapegoattattoo’s – I just added the left-right idea). And it’s really tedious, as Tess says…

    I wonder: could one add such links to the attachment pages once for all with CSS?



    No… I’m afraid CSS won’t be of help in this case. PHP would be required for such a thing… even JavaScript would help, but…


    Thanks. (That’s what I suspected, but I don’t really know anything about CSS so I needed your verdict!)


    Moderator Emeritus

    In my opinion, the gallery feature has potential, but it is really underdeveloped.
    I’ve experimented with it in hope, but have not yet found it user friendly unless you want only…
    Never mind. High school reunion, last night’s party, a synopsis of what you ate all day…



    It’s all supposed to change when 2.8 comes around, hopefully for the better. :)

The topic ‘Managing a Gallery’ is closed to new replies.