• Resolved capitanb

    (@capitanb)


    How do I add NEXT/PREVIOUS buttons when splitting a post into multiple pages?

    Only the page numbers show up, so instead of a next button to navigate, a reader would have to click the small, individual numbers, which I think is a little cumbersome.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi capitanb. Welcome to the Heuman forum. To replace the page numbers with previous/next:

    1. Copy single.php to a child theme.

    2. Replace this line:

    <?php wp_link_pages(array('before'=>'<div class="post-pages">'.__('Pages:','hueman'),'after'=>'</div>')); ?>

    with this:

    <?php wp_link_pages(array(
    	'before'=>'<div class="post-pages">',
    	'next_or_number' => 'next',
    	'previouspagelink' => 'PREVIOUS ???',
    	'nextpagelink' => 'NEXT',
    	'after'=>'</div>'));
     ?>

    The wp_link_pages function arguments can be found here in the Codex. The default wp_link_pages function can display either page numbers or text. If you want to display both you could follow the steps described in this post.

    Hope that helps.

    I got this working but it looks like html output for the page links and I would like some help with the css to make the links look nice like the example in the post
    thanks

    @eslunite – This topic is marked Resolved so please create a new topic . You can include a link to this topic as a reference. Also, posting a link to your site would be helpful. Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Next/Previous Page Buttons’ is closed to new replies.