1

I wrote a very long page with a lot of content and would like to add a pagination to make it more readable. I added in the texteditor several <!–-nextpage–-> but it doesn't create any pagination, although in the default twentythirteen page template the wp_link_pages function is called

<?php wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); ?>

I'm using a child theme with little customizations but I also can't get it to work with the default twentythirteen theme with no child theme and customizations. How can I get a pagination on my page?

0

This might work.

1.Open your page.php (or some other custom-page-template.php in which you want to make it work)

2.look for the line where you see

<?php the_content(); ?>

3.Insert

<?php wp_link_pages(); ?> 

on the very next line like this

<?php the_content(); ?>
<?php wp_link_pages(); ?>

4.Go back to your editor and refresh the preview.

5.Now if its working just publish the page!

If you want to configure it visit the codex page here

  • I have checked in TwentyThirteen. It already contains that wp_link_page(); thing in the manner you mentioned. and is working absolutely fine(I tried using the tag myself). There might be some other issue. Would need some more explanation. – Mohammad Mursaleen Apr 7 '14 at 4:06
  • I don't understand because I just tried with a fresh install of wordpress and twenty thirteen and it still doesn't work. See link When looking at the "View source code", you can see the <!–-nextpage–-> . There may be something I misunderstood about this feature even though I read the related codex. – Kimberley Furson Apr 7 '14 at 10:56
  • 1
    @kimberleyFurson Sorry for late reply. It is suppose to be "<!--nextpage-->" not like this "<!----nextpage---->" which I saw in your page. – Mohammad Mursaleen Apr 14 '14 at 8:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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