Add 'continue reading' to paginated posts. (3 posts)

  1. gulliver
    Posted 3 years ago #

    If I've understood this correctly, using the <!--nextpage--> code paginates the page and generates the 'Page 1 2 3' etc links.

    Is there a way to have it add a 'continue reading' link - similar to the <!--more--> code when using excerpts?

    UPDATE: Ignore this - my brain had clearly stopped working. Obviously, it can be used more than once, each time with appropriate text changes so that one generates a 'continue reading' link and the other the page numbers.

  2. keesiemeijer
    Posted 3 years ago #

    The function that generates the page links is wp_link_pages(). You can use pagenumbers or next and previous links with this function. Try it with this in your single.php or page.php:

    <?php wp_link_pages( array( 'next_or_number' => 'next', 'nextpagelink' => 'continue reading', 'previouspagelink' => 'Previous Page ', 'before' => '<p>' ) ); ?>
  3. gulliver
    Posted 3 years ago #


    That's better code than I was using.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.