• Hello

    I am building a photography portfolio with WordPress as a CMS at the moment. The main part of the site shows posts which are just an image in and uses the categories to organise them. There is a gallery page here:

    https://www.cliveframpton.com/index.php/gallery

    I’m using the Image Extractor plugin to display just the first image from each post here, for each category. This is all fine so far.

    But…

    When you click an image to go to the single view for that post I want you to be able to cycle through the images in that category with next and previous post links.

    At the moment I have text links in there which is what WordPress offers, but I need to be able to use the loop or the full power of WordPress in some way to refer to the next and previous posts in a more developed way.

    Basically I want to call the image extractor plugin (or indeed any tag such as the_content, the_permalink or anything you can do from within the loop) for the previous and next posts when I’m showing a single post view, rather than just using the generic text link which offers no control. I would ideally format an image with a link to the post itself to allow people to browse the category intuitively a bit like you might do on Flickr for example…

    https://www.cliveframpton.com/index.php/gallery/portraits/face-ii/

    At the moment I can’t make those small images the relevant ones or give them a link to the_permalink of the target post either. It feels like I need to be within the loop and just be able to offset the query by 1 either way to refer to the previous or next post in the category.

    I can’t find any way to do anything like this at all, is it impossible? It seems like a sensible thing you ought to be able to do. I don’t want to use text links or generic images here if I can help it. I know there is a plugin to use a standard image for these links but, I’d love to be able to show the actual small preview image taken directly from the previous or next post…

    Does anyone have any ideas?

    ?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Showing previous and next posts in more detail’ is closed to new replies.