How To Split Long WordPress Pages and Posts
This entry is part 1 of 7 in the series Bricks and Mortar WordPress

Since When Is Numbering Pages Theme Related?

The short of it is this . . . Some themes don’t support pagination unless you modify them.

Switching Themes Partially Solved The Problem

Like I said, I had already tried everything else, so I switched my theme to the old standby, Kubrick (which is automatically installed with every WordPress installation) … And voila!  There were the page numbers.  True enough, this was a theme-related problem, and such an anomaly hadn’t been addressed by the first couple of postings I’d found that dealt with using the nextpage tag.

I went searching again.  This dude hit the nail on the head and provided answers to what to do when the theme being used didn’t support pagination.  The short of it is this . . .

Some themes don’t support pagination unless you modify them.

Adding Pagination To Themes

Amazing Grace by Vladimir Prelovac

Wouldn’t you know it:  My main theme, Amazing Grace, does not support pagination right out of the box!  I love the Amazing Grace Theme by Vladimir Prelovac,1 so I was curious as to why such a core feature was not considered.  Another favorite theme, iNove2 by MG didn’t have support for page numbers included either. At any rate, once you know how, adding support for pages is pretty straightforward.

Again, I found the answer over at WordPress Modder, where Adam not only dealt with the issue of adding the nextpage tag, but goes further to explain how to add support for pagination back into your theme, using the WordPress “wp_link_pages” command.

 

In case you run into this problem, here are the steps.

  • Select Editor from the Appearance Menu in your WordPress admin panel.   Your theme will be highlighted in the drop-down box.  On the right side of the page is a list of the files that belong to this theme.
  • Navigate down the right side and select page.php.  If there is not a file named page.php, that means you will need to select index.php, instead.
  • Slowly skim this file until you find the section with a line that includes “php the_content“.  The section will be very similar to the image below.

You will type in your code just after that section. Alternatively, I have included the code for you below so you can easily copy-and-paste it in the appropriate place in your theme’s file. (Note: I added in the br (break) tags to include some space but they can safely be removed.)

addpagenumbers2template3

Here’s the code you can cut and paste.

<?php wp_link_pages("<strong>Pages:</strong>", "", "number"); ?>

You can get fancy with identifying your pages.   Here’s an idea . . .

continue-reading

Below is the code used … Just change the “Continue Reading:” part to whatever suits your fancy!

<?php wp_link_pages('before=<h3>Continue Reading This Article &raquo; &after=</h3>&next_or_number=number&pagelink= %'); ?>

For more options when using wp_link_pages, see the WordPress Codex.

Thanks, Adam! I soooo appreciated the time he took to explain this thing fully, when I read about a contest he’s running he was running, I agreed to post a link back to his new site.  (The contest will be over the last week of Oct. 2009 is over.)   Show him some love by stopping by to check out his LearnWebTools.com project.

Something Extra:  Plugin Functionality

Whatever extra imagined functionality you want to squeeze from WordPress can usually be found in a plugin.  True to form, there are a few plugins around that will give you more  flexibility with displaying your page numbers.

These plugins work for themes that already have pagination included; however, they’ll also work on your theme once you’ve added the pagination function back in.

Note: Always download your plugins from the official WordPress Plugin Site.  If you want more information on the plugin, the official site then offers you links to the developer’s website.  Official means peer-reviewed, tested, and approved for the version indicated.

Now, for those pagination plugins:

  • PageBar

    http://wordpress.org/extend/plugins/pagebar/

  • WP-PageNavi

    http://wordpress.org/extend/plugins/wp-pagenavi/

Your feedback is always welcome.  Got something to say?  Leave your comment on the first page of this article!







Footnotes

  1. I love the beautiful Amazing Grace and Blue Grace Themes by Vladimir Prelovac.  [↩ go back]
  2. Also popular, and one of my favorites, is the iNove Theme by MG.  [↩ go back]



About Vernessa Taylor

Vernessa Taylor has written 114 posts here.

As a Technology Consultant, works with both online and offline business owners. She writes about small business systems such as project management and customer referral systems at CoachNotes Blog. Follow her on Twitter @CoachNotesBlog.

VN:F [1.9.13_1145]
Rating
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.13_1145]
Rating: 0 (from 0 votes)


Related Posts Plugin for WordPress, Blogger...



More articles on similar topics . . .

  1. Display RSS Feeds on Your WordPress Pages, Posts, or Sidebar Have you been searching and searching for a way to include your RSS feeds on a page or post in...

  8 Responses to “How To Split Long WordPress Pages and Posts”

Comments (7) Pingbacks (1)
  1. I have just subscribed to your blog, because I am impressed by this article and I saw that you also have other articles which I am definitely going to check out!


    • Twitter:

      Hi Peter! Thanks for your kind words and for subscribing to CoachNotes Blog. I hope you’ll find the time to stop in again. Wow, you’ve got thousands of games on your site! Do you plan to add a blog to discuss tips, techniques, strategies for them or do you already run a forum?

  2. Thanks I had been trying to find out how to do this. Great clear explanation.


    • Twitter:

      Greetings Craig! When I was looking for the info on how to split long WordPress pages, there were only a few around. Glad you found this article useful. Let me know if I can help you further.

      BTW, you have a great sports site and wonderful opportunities to grab some Cup memorabilia. Have you considered adding the plugin that encourages other sports enthusiasts in the CommentLuv community to visit and share their thoughts?

      Welcome and come again!

  3. Thanks for sharing. Could nog get it to work at first cause I was trying to split a post. Found out I had to change the single.php file. Now it works fine!

  4. It was interesting to read about how to split long WordPress Pages and posts. I just wondered how its done in WP blogs. Now that I know it, I’m feeling more well informed. Likes visiting your blog, since each posts teach me something new.

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CommentLuv badge

   
© 2009-2012 Vernessa Taylor, CoachNotes Blog.
164 Ford Hollars Rd., Vilas, NC 28692
Thanks to WordPress Developers, Plugin Authors, Graphic Artists, and Theme Creators. CoachNotes on Technorati. Suffusion theme by Sayontan Sinha