Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

share|improve this question

3 Answers 3

up vote 1 down vote accepted

This question was more extensively discussed at Hybrid support forum. I made and posted snippet for custom pagination of custom fields content there.

share|improve this answer
    
If you've got nothing better to do and would like to help the larger issue I was trying to solve with this, it's posted here: wordpress.stackexchange.com/questions/1783/… :) –  matt Sep 25 '10 at 17:45

for me <!-- nextpage --> is not working for any theme. Check the post http://article-stack.com/education/web-design-n-development/blog-blogger-blogging/xampp-how-to-run-test-wordpress-locally.amty

share|improve this answer
    
Please create separate question for your issue, this is neither answer or relevant information for this question. –  Rarst Sep 25 '10 at 9:58

Inserting into your theme does not make much sense, because it's parsed prior theme display. You need to have that in your posts content prior to display (that means in $post->post_content when queried). This might not already be the case, so a reason why you currently experience that it is not paginating. The other reason why this happens is an incompatible theme.

The function that takes care about pagination in post templates (templates are a theme related part in wordpress) is called wp_link_pages(). You theme must support the multipage global variables otherwise this will never work. Those global variables are: $page, $pages, $multipage, $more, $numpages. You can learn more about their usage in setup_postdata() (undocumented function, see setup_postdata() in source).

So if you manage to get all the <!--nextpage--> fragments into your posts content and your theme supports multi pages for that custom post type template, you should be fine. The wp_link_pages() function might be handy to achieve this.

share|improve this answer
    
My theme supports it so that is not an issue. I'm using custom post meta fields for the post content so technically, I"m not actually using the_content. I guess what I'm asking then if I can't utilize <!--nextpage--> inside my theme files, how can I hard code a page break into a theme? –  matt Sep 5 '10 at 18:40
    
If you don't use the_content / $post->post_content then you're left alone on your own and maybe the best thing you could do w/o coding a whole paging business logic on your style of having content managed is to call wp_link_pages() on your own. And/Or to reuse the global variables I named. –  hakre Sep 6 '10 at 21:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.