0

Does anyone know how to customize wp_link_pages() so that <!--nextpage--> will show like "<< previous" and "next >>" links instead of "Pages: 1 2 3 "?

Note:- i used "<!--nextpage-->" in my Wordpress tinymce editor for pagebreaks between long pages.

1 Answer 1

3

You can use next_or_number param of wp_link_pages to achieve this.

From Codex:

next_or_number

(string) Indicates whether page numbers should be used. Valid values are:

  • number (Default)
  • next (Valid in WordPress 1.5 or after)

Then you can use nextpagelink and previouspagelink params to modify these links texts.

So doing it like this should do the job:

<?php
    wp_link_pages( array(
        'next_or_number' => 'next',
        'nextpagelink' => 'next &gt;&gt;',
        'previouspagelink' => '&lt;&lt; previous'
    ) );
?>
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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