How to split a long post into multiple pages In WordPress ?
If you publish long posts on your website or blog, it can be tedious for your readers to scroll and scroll through heavy chunks of text. A very long post can take very long to load, slowing down your site. Also, many readers prefer to have logical breaks while reading.
An easy way to break up your words is by splitting your posts into multiple pages.
In today’s Weekend WordPress Post, I’ll show you how to split your WordPress posts.
How to achieve this?
In the post editor, switch to “Text” mode rather than “Visual” mode and add the following tag wherever you want to split your post While editing your page/post through the WordPress editor, you need to add tag at the place where you decide to split the page.
You can add this tag anywhere you want as many times as you want.
Compatibility Issue with themes
Sometimes pagination is successful but the navigation section does not appear. In other words, your page gets split but you don’t find any link to access them. This is because your present theme is unable to handle the tag for splitting the page. It’s a small problem and can be fixed easily. Insert the following line to the theme’s template file.
<?php wp_link_pages(); ?>
Often the template file is called single.php. However, some themes might not have a separate file for individual posts, and might utilize index.php itself. In this case, you will need to edit this file.
For example, this is what we have set on our site.
<section id=”body”> <div> <?php the_content(); ?> <?php wp_link_pages(); ?> <?php comments_template(); ?> </div> </section>
Benefits to Splitting Posts
There are a number of benefits to splitting posts, such as:
- Improve the look and feel of your site if you regularly publish long-form articles, tutorials,
- More page for you to place your ads, increasing advertising revenue
- Increase the number of page views on your site
- Help decrease the bounce rate on your site by encouraging readers to spend time reading through your content