WordPress.org

Support

Support » How-To and Troubleshooting » Add 'continue reading' to paginated posts.

Add 'continue reading' to paginated posts.

  • 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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator keesiemeijer

    @keesiemeijer

    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>' ) ); ?>

    Thanks.

    That’s better code than I was using.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add 'continue reading' to paginated posts.’ is closed to new replies.