pagination next/previous goes to next article.
-
HI Guys,
noob here, I have a small problem i can’t make work.
when I’m at the last page of an article (page 5of5), the next button would be there but clicking next would take me to Page 1 of the next article. Similarly, if I’m at Page 1, there would be a previous button which would take me to the previous article.
this is my code it goes trough the pages and on page 5 the Next disappear.
I want it to show even on last page and then when i click Next it redirect to the next article. same for previous.<?php wp_link_pages(array(‘before’ => ‘<span id=”prev-link” class=”next-prev-link”>’,’after’=>'</span>’, ‘previouspagelink’ => __( ‘Previous’ ),’nextpagelink’ =>__( ” ), ‘next_or_number’=>’next’)); ?>
<?php wp_link_pages( array( ‘before’ => ”, ‘after’ => ” ) ); ?>
<?php wp_link_pages(array(‘before’ => ‘<span id=”next-link” class=”next-prev-link”>’,’after’=>'</span>’, ‘previouspagelink’ => __( ” ),’nextpagelink’ =>__( ‘Next’ ), ‘next_or_number’=>’next’)); ?>
- The topic ‘pagination next/previous goes to next article.’ is closed to new replies.