Post Pagination – How to Split WordPress Post into Multiple Pages

You can increase your website pageviews and reduce bounce rate in WordPress by splitting your Post into multiple pages.It also help to break a long post into multiple pages and reduce page loading time.In this post i will tell you about how to split your Post into multiple pages.

I was seeing on news website that they split a long post into multiple post,so i thought to post an article about how to split an post into multiple pages.

https://www.youtube.com/watch?v=RGbYP2lfOSQ

Paginate your WordPress Post

You could split a single post up into different web pages by typing <!–nextpage–> in your post.
It will not work if your theme doesn’t have

<?php wp_link_pages( $args ); ?> 

,so first of all add the following code to your theme.
Step 1: Go to your theme Editor(http://Your-Blog-URL.com/wp-admin/theme-editor.php)

Step 2: Now go to Single Post Editor
Single Post Editor
Step 3: Now search(Ctrl+F) for <?php the_content(); ?> and Put this code just below it.
Search the Code

<?php
 	$defaults = array(
		'before'           => '<p>' . __( 'Continue Reading:' ),
	);
 ?>

and then insert the

<!–nextpage–> code in your Post.

Note: you need to use the text mode of the editor to add the <!–nextpage–> Code
Add the NextPage Code to your Post
It will work perfectly .
If you have any question then please ask through the comments.

Useful Links

  1. Styling_Page-Links
  2. wp_link_pages
Note: I had removed the Example,but it works.

Shubham Kumar

Hey, I am Shubham and i love Blogging, Coding and exploring new things and obviously sharing my experience with you.

5 Responses

  1. Thenks Yor Trik Is working So You the good

  2. Thenks This Codd And This Trick Is Working Thenks Thenks Thenks…………..

  3. Azman says:

    Hey Shubham, great post!

    How can I just use Previous and Next button instead of numbers.

    I want navigation like this (screenshot attached)

    • Hey Azman,

      Thanks. Use this code to just show next and previous button navigation.

      <?php
       	$defaults = array(
      		'before'           => '<p>' . __( '' ),
      		'after'            => '</p>',
      		'link_before'      => '',
      		'link_after'       => '',
      		'next_or_number'   => 'next',
      		'separator'        => ' ',
      		'nextpagelink'     => __( 'Next' ),
      		'previouspagelink' => __( 'Previous' ),
      		'pagelink'         => '%',
      		'echo'             => 1
      	);
       
              wp_link_pages( $defaults );
      
      ?>
      

      What I have changed in the above code is that I have set next_or_number value to next in the $defaults array.

      Thanks
      Shubham

Leave a Reply

Your email address will not be published. Required fields are marked *

shares