I have a custom post type for a Slideshow which uses Custom Post Meta to insert the different slides. How can I code the <!--nextpage-->
tag in between the sides in my slideshow.php so that they slides will paginate? Right now when I try to do it the code doesn't show because it by it's nature it commented out.
views:
22answers:
1
A:
If the slides are each separate custom posts, the <!--nextpage-->
tag won't work anyway. <!--nextpage-->
is designed to add pagination to long posts ... i.e. break a long, single post (or custom post type) over multiple pages.
From the sound of things, you want a pagination setup that will work for multiple individual custom posts.
What you want is the PHP function next_post_link()
. This "template tag displays a link to the next post which exists in chronological order from the current post."
EAMann
2010-09-05 14:24:56
No, one post encompasses numerous slides. I am not using the post content field to enter the content. I am using custom meta boxes to enter custom post meta information for each slide. I have template tags that insert each slide info into the slideshow.php file however I need a way to specify a page break between each slide.
matt
2010-09-06 05:16:21
`<!--nextpage-->` wouldn't work in that situation, either. It's meant to be a flag for `the_content()` to split the post content into multiple pages. Without seeing exactly how your using your various custom fields, there's nothing anyone can recommend for you to do to split a post across multiple pages. Pagination isn't a built-in feature for custom fields, so you're going to have to re-build the entire system to handle it.
EAMann
2010-09-08 00:16:19