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.

| improve this question | | | | |
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'
    ) );
?>
| improve this answer | | | | |

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.