WordPress Pages Long Articles

2019-04-09 0 Comments Views

We may encounter such a situation: published articles or pages are too long, want to divide an article into several pages, sometimes to facilitate users to read, sometimes can be said to be for SEO, in the end for what purpose, that is your business, we are here to tell you how to achieve WordPress article paging function.

WordPress system is built-in paging function, to achieve it is extremely simple, you just need to add the following code where you want to paginate (note, in text editing mode):

<!-next page- >

But there's another problem. To make this code truly paginate, you need to use WordPress theme support. WordPress's default theme is supported. If your theme does not support it, the solution is simple. Find the following line of code in single.php in your theme file:

<?php the_content(); ?>

Under this code add:

<?php wp_link_pages('before=<div id="page-links">&after=</div>'); ?>
Related Posts

Maoge

My Wechat: dongyangyemao Email: dongyangyemao#qq.com

Article Comments(0)