Tell us what you are trying to do?
I'm trying to create a page which shows the following in this order:
1. Current item details (child of parent post)
2. Prev/Next navigation
3. Related items (children of the same parent)
I've attached an image of what I'm trying to achieve.
I'm part way there - but as the prev/next navigation is part of the theme single-painting.php template it's appearing below the related items, rather than above.
What is the link to your site? hidden link
Is there any way to either:
a. Move the prev/next links into the content template rather than the theme file so that I can position them?
or
b. Add a content template or view into the theme file so that it can be below the navigation links.
I'm afraid I haven't been able to get that to work. I've attached screenshots of the content template, functions and the frontend so that you can see what I've done and the result it's had (a mostly blank screen).
That's because the pagination shortcode basically breaks the page. I've removed [pagination] from the content template and you can see that the painting page now loads. Here's an example: hidden link
If you add [pagination] back in it will break again.
Thanks, that looks brilliant. I've got a couple of refinements I'd like to make, is this something you can help me with?
1. I'd like the next/prev to cycle through the paintings alphabetically by title rather than chronologically. I've added letters (A, B, C etc) to the painting titles so that we can see that working.
2. If there's no 'next post' is it possible for that to either not display or not be a link? At the moment if I go to the first in the sequence (hidden link) the next post link just reloads the page we're already on, which is a bit confusing.