I'm trying to get pagination in my pages, so I use this default option:
<?php wp_link_pages( array(
'before' => '<div>',
'after' => '</div>',
'link_before' => '<span class="page-numbers">',
'link_after' => '</span>',
'next_or_number' => 'number',
'separator' => ' ',
'nextpagelink' => __( 'Next page', 'behold-universal-one'),
'previouspagelink' => __( 'Previous page', 'behold-universal-one' ),
)); ?>
works all except "nextpagelink" and "previouspagelink". No matter what I use, no text next or previus pages is visible. Ofcourse there is more than one page break. Wordpress 5.1
Any ideas why?
I'm trying to get pagination in my pages, so I use this default option:
<?php wp_link_pages( array(
'before' => '<div>',
'after' => '</div>',
'link_before' => '<span class="page-numbers">',
'link_after' => '</span>',
'next_or_number' => 'number',
'separator' => ' ',
'nextpagelink' => __( 'Next page', 'behold-universal-one'),
'previouspagelink' => __( 'Previous page', 'behold-universal-one' ),
)); ?>
works all except "nextpagelink" and "previouspagelink". No matter what I use, no text next or previus pages is visible. Ofcourse there is more than one page break. Wordpress 5.1
Any ideas why?
wp_link_pages()
doesn't support numbers and next/previous links. If you set next_or_number
to number
, the default, then the pages will be shown as number links. By default that looks like this:
Pages: 1 2 3
If you set it to next
then you'll get this output:
Pages:Previous page Next page
The nextpagelink
and previouspagelink
arguments are used to changed those labels, but they won't add next and previous links to the numbered pagination.