Every screenshot (or video) in the gallery has it’s own individual page. You get to them easily, just by clicking the image itself. We want to make this page as compelling to visit as possible. We’ll work on that in some upcoming videos, but for now let’s make sure the individual pages at working in WordPress and using as much from the other gallery templates as possible.
The file we are working with is single-screenshot.php – which is named very specifically. Just like single.php controls individual blog posts (WordPress will use this template automatically), single-screenshot.php controls the individual gallery posts. WordPress also uses this template automatically because of the name. “screenshot” is the name of our custom post type.
We add pagination to these single pages via some
previous_post_link. We place them in the gallery bar navigation include with some logic so that they only appear on single pages.
We extend the breadcrumb navigation at bit by adding the title of the screenshot.
We have plenty to work with now as we move into designing for this page.
For your pagination issues you could also try:
as an alternative to is_single()