How-to-Split-WordPress-Posts-into-Multiple-Pages
How-To Paginate WordPress Posts and Pages into multiple pages

How-To Paginate WordPress Posts and Pages into multiple pages

Nur . Posted in How-To, Plugins 540 Views

Splitting the long WordPress posts or pages  is the best way to display your long and different contents on multiple pages without changing the Post or Page’s URL. If you paginate WordPress long post or page, it will be easy for readers to jump from different parts of the post. As well such way you can make your post more interesting for blog readers.

You must have seen such features on different websites and you may have been thinking which WordPress Plugin used to present the post in this way. But WordPress have Built in feature for Post or Page pagination. All you have to add the following tag in your post where you want to break the page or Post. Go the HTML editor and add the following code :

<!--nextpage-->

Screenshot of quicktags Post dividing post into Multiple pages

That’s all, by putting one simple <!–nextpage–> tag  in the content of your post or page, you are breaking the post to get more views for a single post or page.

Styling the pagination View


Most of the WordPress themes use single.php file to display the Post content, in that file need to tell WordPress to show the pagin links for <!–nextpage–> quicktag. If you don’t want to display the default nextpage quicktags then you have to create the CSS class for styling and need to edit the php loop on single.php file or need to add a function in the function.php file.

If you are using DIYTheme, then read this tutorial for detail about Customizing and Styling the NextPage “Post Pagination” for your theme. Otherwise add in single.php (or loop-single.php) you’ll find the WordPress loop which displays your post or page.

wp_link_pages();
<div id="content" role="main">

<?php while ( have_posts() ) : the_post(); ?>

<nav id="nav-single">
<h3 class="assistive-text"><?php _e( 'Post navigation', 'twentyeleven' ); ?></h3>
.
.
</nav><!-- #nav-single -->

<?php get_template_part( 'content', 'single' ); ?>
wp_link_pages();
<?php comments_template( '', true ); ?>

<?php endwhile; // end of the loop. ?>

</div><!-- #content -->

When you add the wp_link_pages function in the loop,  this loop will show the post or page title and the content, and displays pagination in the single post or page.

Twenty eleven WordPress theme by default have the pagination style as follow:

<span class="nav-previous">
<?php previous_post_link( '%link', __
( '<span class="meta-nav">&larr;</span> Previous', 'twentyeleven' ) ); ?>
</span>
<span class="nav-next">
<?php next_post_link( '%link', __
( 'Next <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
</span>

In the above loop displaying the some default arguments as used by the Twenty-Ten WordPress theme. If you find any difficulty in style the pagination then contact us, we can help you to match your pagination according to your theme.  If you find this post is helpful for you, like the WPArena facebook’s fan page.

Nur

I am a Wordpress, Website Developer and Designer, creator @ WP Arena, Provide Free WordPress consultation and can help to install WordPress in a secure way to small businesses and bloggers.
  • http://scxlive.com SCX Live

    Hello WParena, I have free theme that not supporting that nextpage quicktag, so how to make it works? just add those php codes??

  • http://wparena.com/ Wordpress Arena

    by the way which free theme are you using, if for your theme not working, then you should need to edit your loop in the single.php file, the code is givn above, try yourself, if still not able to get the pagination, send us your detail via contact us pages and we can do it for you…

  • Pingback: Tweet Parade (no.49 Dec. 2012) | gonzoblog

Free & Professional WordPress Security Service Free & Professional WordPress Security Service

We Love WordPress. WordPress Arena is a place for WordPress Developers and Designers, providing Tips, tricks, tools and resources to build a website or blog on WordPress. We also present The WordPress Showcase for all kind of WordPress Powered Websites.

Recent Comments

Tink Seagraves

|

Seems to have a little crush on G-Dub!