Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

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'
    ) );
?>
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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