wordpress.org – How to replace pagination with Next/Previous for multi page posts?


I have searched but could not find code to replace the pagination from 1 2 3 4 5… etc. Into “Previous” “Next”, for multi page posts.

What I find are solutions to do this for switching to the next post. But that’s not what I need. The next/previous buttons should link to the next/ previous page for long posts that are split up into multiple pages with the <!--nextpage--> code in the content.

I added this code to functions.php, but it does not do anything.

wp_link_pages( array ( 'next_or_number' => 'next' ) );

What am I doing wrong?

Maurice 2 years 2022-01-02T09:46:54-05:00 0 Answers 0 views 0

Leave an answer