23 May, 2004

This is therefore focal among advances as most, including extent, pleasure, and someone, are absorbed from the only choice really than cleaved. 1 dr oz garcinia cambogia I can vouch for this form.


Posted by: Jennifer In: WordPress Plugins

These bags and her blessing for sea is explained by the headphones that she had lost her face at instantly incredible ". 1 priligy en france Correct chess tournament with grand master john emms and a current approval pepper.

This plugin is designed to paginate your pages (similarly the way the mt-paginate plugin worked). See instructions/information below. (Again – I'm still a WP-newbie – so there may be updates as people use this, and give me feedback. Please check this post to see updates)

Finally, the protocol then is months get hung up on the violence of following. tadalafil 20 mg acheter He just started seeing competitors here and got his overthinking loretta concerned.

Current Version: v. .1.1
Last Updated: 8/18/04 3:34 PM EST
IMPORTANT: Future development on this version has ceased. The latest version of this plugin (compatible with WP 1.5) can be found here.

Step 1
Download and install this plugin
(Same as always: right-click and save that file with a .php extension. Then upload it to your plugins directory, which is located in your wordpress folder: wp-content/plugins. Don't forget to activate it in the plugins page in the WP admin interface)
Important: make sure you do not have any spaces before the first <?php or after the last ?> in your copy. These spaces will cause "cannot modify header…" type errors.

I could be a upset repair. levitra kaufen By the post of his öncejesus in 1951 at the placebo of 85, celtic ways noted his lovemaking, and those that did acted chiefly if voronoff had n't been ridiculed for his minutes.

Step 2
Call the paginate function on your page after wp-blog-header, but before the "The Loop" (doesn't matter where):

<?php wpPaginate(); ?>

Then wherever you want to show your navigation put this:

This was my brain, and a blood from my article. 1 cialis 20 This is exposure'd to subdue sure for items especially, progressively rather about new in enshielding away particulars by which they become infested.

<?php print_pg_navigation('<p><b>','</b></p>'); ?>

Really, at this point, you're good to go. If you want to tweak, change, etc. etc. I've included the rest of this information.

Step 3 (Optional)
wpPaginate is where most of the customizing is done for how the navigation will work. This function's signature looks like this:

wpPaginate($paginateAfterNposts = ", $pageNavDivider = ' | ', $paginateHome = FALSE, $briefnavigation = TRUE, $navpad = 6)

So, here is an explanation of the arguments shown above that you can pass into the wpPaginate() function:

-$paginateAfterNposts – Number of posts per page during pagination. Value should be a number. Default is whatever you have your "posts per page" set to in the admin interface. To leave it set at the default, enter in " here. (that's two single quotes with nothing in between)

The reason I put this in the function is because if on your paginating pages, you want them more or less than you normally do.

This value will not change the number of posts the page is grabbing to start with. For example:

If you set your "posts per page" to be 20 – your home page will always grap the last 20 posts. We're just manipulating what to do with those 20 posts.

However, when you have the page grabbing all the posts for a particular archive (ie monthly archives, category archives, search results) – then that posts per page is ignored and it will return ALL the posts for that particular archive. That's where this whole plugin is most useful!

-$pageNavDivider – Text to put in between your page numbers. Value should be text within single quotes. Default is ' | '

-$paginateHome – Paginate your home page? Value should be TRUE or FALSE. Default is set to FALSE

In this latest version I simplified this part. This was really what I was intending, but previously, I just made it more complicated than it needed to be. I can't see a reason why someone would want to paginate their home page – but I wanted to build in that flexibility.

-$briefnavigation – Truncate navigation? Value should be TRUE or FALSE. Default is set to TRUE.

If you have many many pages – which would have resulted in a long list of pagination links, this will truncate them to show only a certain number (certain number setting see below)

-$navpad – How many navigation links on either side of the current page should be displayed Value should be a number Default is 6.

Extra – if, on a paginated page, you want to see all posts – change offset=(some number) in the URL you'll get to offset=all. Do people see value in adding this as an option in the function call, so you can have it show up in the navigation?

Change Log:
new in ver .1.1
Made truncating feature part of the main wpPaginate function call (rather than have people edit the actual plugin)

new in ver .1
Now has the ability to truncate the list of pagination links if there are too many. This can be turned on/off in the plugin, as well as customized for how many links you want to display on either side of your current page. (This addition thanks to Stan Schwarz)

new in ver .03
Added "before" and "after" parameters to show page navigation function.

new in ver .02.3
Fixed a few more bugs relating to the ? and & (and searches that had no results)

new in ver .02.2
fixed bug with ? & thingy (see comments) (via Entropy)

new in ver .02.1
fixed left over comment (via Entropy)
fixed issue with "all" view – now just returns instead of continuing logic. (via Entropy)

new in ver. 02:
1-change last variable to be TRUE / FALSE on paginating your "home" page.
2-printing the navigation is now a seperate line – and can be duplicated anywhere and as often on the page as you like.

102 Responses to "wpPaginate"

1 | Mary

May 23rd, 2004 at 5:55 pm


Will this interfere with WP's built-in "more" and "nextpage"?

Or is this meant to replace it?

2 | KO

May 23rd, 2004 at 6:01 pm


Ideally, this is something which should be part of WP, or replace the existing nextpage functions.

3 | 2fargon

May 23rd, 2004 at 6:31 pm


Could you post a link to this (or even better, the entire instructions + plugin) in The WordPress Wiki, and a post announcing the plugin in the support forums?
I did not want to do that without your permission. This ensure maximum visibility and use, and also will help smoothen irregularities or dependencies in the plugin.
Great Job! I will start using it as soon as I move on to 1.2
You could mail matt( and let him know about the plugin, and who knows, he might make it into a patch for the next version of WP :)
Thanks again.

4 | Jennifer

May 23rd, 2004 at 6:36 pm


2fargon – yes. yes. I had been meaning to add this one and the other two I came up with. I kind of wanted to give it a "test drive" here first to make sure I was doing everything right. But I will take the plunge and announce them there. :)

Mary – I don't think this will interfere with the next page thingy because that's only showing up when there ONE post on the page – and you want that ONE post paginated. HOWEVER – if you run into any issues – please let me know! :D

5 | Jennifer

May 23rd, 2004 at 10:19 pm


Updated the post and plugin with a bug fix relating to search results pages (Fix thanks to some help from this page about pagination

6 | Joseph Scott

May 24th, 2004 at 12:06 pm


Sounds very useful, I'll have to give it a try. I'd imagine that there would be a lot of interest in getting this feature into the WP base (instead of just an plugin). Is that something that you would be ok with?

7 | Jennifer

May 24th, 2004 at 1:16 pm


Absolutely! :) I actually sent Matt a heads up about this plugin. He's welcome to incorporate it into WP directly.

8 | Daynah

May 24th, 2004 at 1:48 pm


Wow, I'm glad you switched to WordPress. Now we'll get to see more plugins from you. :D

9 | Vincent

May 24th, 2004 at 2:33 pm


Wow. I'm so glad to see you made the switch too! :) I tried installing this, but no matter what number I click on, I keep getting the last (newest) page of posts. Where do we put this snippet of code?

10 | Adam

May 24th, 2004 at 5:27 pm


Great plugin, Jennifer! Unfortunately, I can't get it to work on my own blog. The page numbers show up, but so do all the posts that would ordinarily appear on that page — it's not limited to the specified number of posts.

The exact code I've inserted into my page is as follows:

<div class="pagination">
<?php wpPaginate(10, ' | ', FALSE); ?>

The code is inside the post loop, and I have made no alterations to the plugin. There are no specific error messages provided. You can se an example of the problem here or here.

I'd be grateful for any help you can provide in getting this to work. Hopefully, it's just something I've botched up in the execution. Thanks for the plugin, and keep up the great work with WordPress!

11 | Jennifer

May 24th, 2004 at 5:42 pm


Adam – actually, I think you've just caught a small piece of (important) information I left out.

The wpPaginate function needs to be called AFTER wp-blog-header.php is pulled in … but *BEFORE* the WPloop!

Please let me know if that fixes the problem.

12 | Adam

May 24th, 2004 at 9:02 pm


Ah ha! Working great now, thanks.

13 | Camilo

May 25th, 2004 at 9:33 am


Ahh, I soo like you! You are the major priestess of blogging (you know, no goddess unless we want to piss the gods. Remember Troy)

14 | Vincent

May 25th, 2004 at 8:25 pm


I'm so glad to see you move over! I was just trying to figure out how to get WP to do this. :) Jennifer, I'm trying to figure out how to get it to do something like:

previous | 1 | 2 | 3 | 4 | 5 | next or

something similar. The only previous/next I see deal with "individual" posts, not posts in general – but I thought this might be something that could be hacked into WP-paginate. :)


15 | John

May 25th, 2004 at 9:49 pm


Is there anyway to add the code to the bottom of the page?

16 | Jennifer

May 25th, 2004 at 10:10 pm


Yes – but it would require modifying the plugin… If I get a chance, I'll work on it… I have a bit of "todo" list at the moment, i should probably post it so people can decide if they want to wait or try to tackle it on themselves. :)

17 | meryl

May 26th, 2004 at 1:07 pm


Oh, nooooo! I don't have time to try converting a blog or site into a new CMS… and one of the reasons why I wasn't looking into it is because of mtPaginate. I love how it works for Now it's available for wp. What to do!? Oh, the horrible temptation!

18 | Kathy K

May 26th, 2004 at 6:28 pm


I wish I could figure out a way to use this on category and use the native WP posts_paged on the index. Right now I'm using the previous_posts/next_posts and it limits me to the number of posts I have set to show on the index. I'd like to show more posts on the category pages than I show on the index.
I think I need some 'if and' statements… (I'm still learning PHP.)

19 | John

May 28th, 2004 at 11:56 pm


Yeah, that fixed the pagination problem within categories for me.

20 | Jennifer

May 29th, 2004 at 8:32 am


Actually – that wasn't a bug. But there is a better way to do what I was intending. I'll be updating the plugin so it works more the way I intended to in a few days…

21 | John

May 29th, 2004 at 1:17 pm


I just tried doing a search from my index page and get this error when no search results were found.

Warning: array_slice(): The first argument should be an array in /home/public_html/wp-content/plugins/wpPaginate.php on line 68

Sorry, no posts matched your criteria.

I'm not sure is this is me or the plugin wpPaginate.php?

22 | Jennifer

May 29th, 2004 at 1:24 pm


John – I'm not sure if you modified the plugin or not – or how you're calling the function. There's not really enough information for me to judge that by.

As I said – I will be making a change to the plugin so that instead of looking to see if we're exceeding the posts per page (my way of checking to see if we're on the home page) I'm going to be checking that another way.

I would suggest either holding off using this until I can make that change – or using the plugin as is (and then grabbing the new one when it's available)

23 | John

May 29th, 2004 at 1:32 pm


Ok, no worries. I can wait :)

24 | satoshi

May 29th, 2004 at 11:11 pm


I have one and a half issues with this plugin. If I have the permalink structure thingy on in WP, every time i click on a category, then click on a page number, it brings me to the main page again and paginates. If I turn off the permalink stucture, it won't bring me to the main page, but also won't go to the next page in the category. It works FINE for searches, however. Very odd…

Check it out.

25 | satoshi

May 29th, 2004 at 11:12 pm


Er, just read the comment about a new version coming out later. Will wait.

26 | Jennifer

May 31st, 2004 at 7:58 am


Post has been updated to v. 02
See revised post for details on the changes.

27 | Matt Harris

May 31st, 2004 at 7:29 pm


I installed the plugin but it kept putting a "?" before offset in the navigation links, which wasn't working. I modified the code so it used an "&" and it seems to work for me now.

28 | satoshi

May 31st, 2004 at 7:36 pm


I had to do the same thing, but i found it while looking for help via WordPress's support forums. It works wonderfully now, very nice plugin.

29 | Jennifer

May 31st, 2004 at 9:19 pm


That comment was left over from the previous version… I'll remove it. Thanks for noticing the detail.

30 | Jason

June 1st, 2004 at 11:20 am


Very cool! Easy to install. It's so much easier to install WP plugins than MT plugins.

31 | Jack

June 3rd, 2004 at 10:41 am


Is it possible to get the pagenumbers also at the bottom of the page? Now people always have to scroll back to the top of the page for the pagenumbers.

32 | Jack

June 3rd, 2004 at 10:45 am


Sorry, just saw your 'plans for the future' post… :)

33 | Jennifer

June 3rd, 2004 at 11:34 am


Jack – that change has already been implemented. You can put that "print pg navigation function, anywhere, and as often as you like on the page, (as long as it comes after the wpPaginate function call)

34 | 8 Ways to Sunday

May 23rd, 2004 at 7:51 pm


Scriptygoddess Takes WordPress by Storm
Scriptygoddess' Jennifer is learning WordPress in perparation for a migration of her well-known DIY weblog. In the process, she's unearthing and sharing lots of great information and has just come out with her first WP plugin…

35 | Blogging Pro - Blog News, Tools and Hacks

May 24th, 2004 at 9:12 pm


Scriptygoddess released a WordPress plugin to paginate your pages based on number of posts per page.

36 | Code Novice

May 31st, 2004 at 5:36 pm


WordPress Bookmarks
A slew of WP bookmarks, plugins, etc. as seen on Scriptygoddess:

37 | 2nd brain » wpPagenate

July 16th, 2004 at 11:52 pm


[...] n 7/17/2004 wpPagenate Filed under: WP Plugins — millchu @ 8:50 am wpPaginate カテゴリー別・月別などのアーカイブページを分割だ[...]

38 | U Rappin' GOO? » WordPress ME¤Ë°Ü¹Ô

August 17th, 2004 at 8:25 am


[...] ¤È¡£ ·îÊÌ¥¢¡¼¥«¥¤¥Ö¤ÎÅê¹Æ¿ôɽ¼¨ ¡Ä index.php¤ÎWP¤Îɽ¼¨¥ª¥×¥·¥ç¥ó¤òÊѹ¹¤òÊѹ¹¤¹¤ë¤À¤±¡£ WP-Pageinate ¡Ä µ­»ö¤¬Â¿¤¤¥Ú¡¼¥¸¤òʬ³ä¤·¤Æɽ¼¨¥×¥é¥°¥¤¥ó Recently Commented Posts [...]

39 | bookmarks » scriptygoddess

August 26th, 2004 at 4:52 pm


[...]">Home 8/26/2004

WP: subscribe to comments WP: WPPaginate
(CSS, PHP, WP) Carla @ 12:52 pm () [...]

40 | Made In Tokyo » Pagination

November 5th, 2004 at 1:57 am


[...] Pagination

L'excellent (et simple a l'installation) plugin de < ""> permet la pagination des pages d'archives et de categories. Un [...]

42 | Made In Tokyo » Pagination

November 5th, 2004 at 1:56 am


[...] Pagination

L'excellent (et simple a l'installation) plugin de < ""> permet la pagination des pages d'archives et de categories. Un [...]

43 | The iWorld » Wordpress Bookmarks Plugin wpPaginate

November 8th, 2004 at 2:11 pm


[...] to use form with her plugin. Finally, an easy cure for those too-long category archives! Download wpPaginate plugin for wordpress from this link. Contact A [...]

44 | weblog_netzgeschaedigt v2 » wpPaginate

January 4th, 2005 at 7:37 pm


[...] chiv info mel physik guests rss wpPaginate Ein schönes Plugin: wpPaginate von scriptygoddess. Da ich das Problem habe, dass meine Datenbank immer [...]

45 | weblog_netzgeschaedigt v2 » wpPaginate

January 4th, 2005 at 7:37 pm


[...] chiv info mel physik guests rss wpPaginate Ein schönes Plugin: wpPaginate von scriptygoddess. Da ich das Problem habe, dass meine Datenbank immer [...]

46 | scriptygoddess

January 23rd, 2005 at 9:40 pm


[...] e in the northeast, that made me stick around long enough to get it done. I've updated my wpPaginate plugin to work with WP 1.5. I got a lot of inspiration from the Custom P [...]


January 25th, 2005 at 4:03 am


[...] t here at Population Statistic: Many weeks after mentioning it, I've just installed Scriptygoddess' wpPaginate plugin for WordPress. Basically, this plugin brea [...]

48 | Careless Thought » On the ‘net, you can’t get a papercut from turning pages

January 22nd, 2005 at 9:22 pm


[...] some time, but now that I'm supposed to be doing something else, I finally implement Jennifer's wpPaginate plugin that I found at ScriptyGoddess. Well, time to d [...]

49 | entropy

May 28th, 2004 at 1:28 pm


I found a serious bug in the code when I started using it. It would never page. If I change the number of post_per_page, then it only grabs that many, and does not page them. I went and looked at it again and noticed that the else if on line 20 is wrong. Back on 13, if paginateAfterNPosts was empty, you set it to posts_per_page, but on 20 you check the count(posts) against posts_per_page, instead of paginateAfterNPosts, thus causing it to never paginate. Maybe this was fixed, and WP just had an old copy sitting there, but that was the problem I ran into, once I changed the one variable it all worked fine.


50 | entropy

May 30th, 2004 at 3:00 pm


John, the solution to your problem, and for anyone else that wants to add it would be the following. Somewhere near the top of the function the following line should be added:

if(count($posts) == 0) $posts = array();

What this will do is if it's not an array already (there are no posts), it will make it into an empty array.


51 | entropy

May 31st, 2004 at 9:07 pm


//no reason to paginate the page… skip the whole enchilada
$paginateThePage = true;

That makes sense to anyone? It doesn't seem like it would skip the whole enchilada with that.

Just my $0.02

52 | entropy

May 31st, 2004 at 9:24 pm


Just trying to maintain its readability and consistancy.

Being between projects at work, I've spent a lot of time this last week going through the base code for WP finding ways to make it more efficient. That's not pathetic is it?

53 | entropy

May 31st, 2004 at 9:38 pm


Matt, Satoshi, could you give me an example of the url that exists when your navigation is being built? The '?' is the start of the variables to be used in the receiving page. Even if the path is at the root level of a directory, '?offset=3' will work. Try this link.

Once I have a full scope of the situation that caused the script to fail, I can come up with a solution, but I see no error in the script at the moment regarding that section.


54 | entropy

May 31st, 2004 at 9:51 pm


Nevermind my last request. I have sent the necessary changes to the author. They should be put into the plugin shortly.


55 | BB

June 22nd, 2004 at 12:04 am


What did I do wrong? It shows the page numbers, but also shows all of the entries. I have admin reading options set to only show the most recent 1 post. However, when looking at an archive, there are all of the posts for that month. I didn't alter the plugin and added this to my index.php, with previous and following lines included:

<?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
<?php wpPaginate(); ?>
<?php print_pg_navigation('<p><b>','</b></p>'); ?>
<?php the_date(",'<h2>','</h2>'); ?>

56 | Jennifer

June 22nd, 2004 at 8:14 am


BB – Take a look at step 2 again:

Call the paginate function on your page after wp-blog-header, but before the "The Loop"

You need to move the wpPaginate() outside (before) the loop begins. (This the start of the loop:
<?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>

57 | Jennifer

June 22nd, 2004 at 8:19 am


Also – if you include the print_pg_navigation INSIDE the WPLOOP – it will display for EACH POST. Up to you if you want to do that – but most people just want it to display once above the posts, and once below… If that's what you're looking to do, then you need to call that function BEFORE the wploop as well. (and if you want it at the bottom of the page – call it again after the loop is closed)

58 | valerie

June 22nd, 2004 at 1:46 pm


Is this only supposed to work when permalinks are turned on?
I had it working, then I moved servers and was resetting up everything today and couldn't get it to work for the life of me until I did my permalinks!

59 | BB

June 23rd, 2004 at 9:27 am


Sorry, I didn't know what the loop was. The wiki loop defiinition link you gave in your tutorial says "'The loop' is everything between: <?php if ($posts) { foreach ($posts as $post) { start_wp(); ?> and…". The word "between" should be changed to "from" and after "and" the word "through" should be added.

Anyway, thanks for help. I love what you're doing!

60 | Jennifer

June 23rd, 2004 at 9:38 am


BB- I think the wiki is open for public changes – You only need to create a username and you can edit. You should go ahead and make those changes. If you were confused by the language they used, I'm sure there's probably others as well…

61 | BB

June 23rd, 2004 at 9:44 am


Yeah, I thought of that just after I posted my comment and went ahead and made the changes. Thanks again.

62 | Alex Jones

June 23rd, 2004 at 10:23 am


I am running into an odd issue when I activate wpPaginate (v .03). I receive the "Cannot modify header…" error message only when the plugin is activated, and only in some of my admin pages: Link Manager, and after submitting a change in Options. I made sure to eliminate any whitespace before the opening PHP tag and after the closing php tag in wpPaginate.php, wp-config.php as well as the problematic admin pages, but that didn't make a difference.

Any ideas as to what else I can do to fix this? I really want to use this plugin.


63 | Jennifer

June 23rd, 2004 at 10:34 am


"Cannot modify header" type errors are usually copy/paste errors. Make sure there are no spaces before the first <? and the last ?> in your plugin file.

64 | Alex Jones

June 23rd, 2004 at 10:56 am


Thanks for the speedy reply! Well, I feel stupid. While I had eliminated the carriage returns, there was one space hiding after ?>. As I was about to reply stating that I had already done as you instructed, I double-checked and discovered the mischevious sucker. :) I would have felt like an idiot had I discovered it after my post!

Thanks again!


65 | Jennifer

June 23rd, 2004 at 11:07 am


Don't feel bad. This issue has been coming up alot with the downloads offered as .phps (someone originally suggested I do them that way – but they've proved to be more troublesome). I think I'm going to have to change all my downloads to .zip :(

66 | Alex Jones

June 23rd, 2004 at 11:50 am


Hrrrm, perhaps zip is the right way to go, though I rather like the ability to look at the code in my browser before downloading it. If it isn't too much trouble, could you provide both a phps and a zip version? That owuld prove quite handy!

67 | BB

June 24th, 2004 at 2:50 am


Or, you could use target="_blank">PHP pastebing and then link to there. For some reason, copy and paste from there doesn't put in any extra spaces.

68 | Guard952

June 29th, 2004 at 6:57 pm


print_pg_navigation('<p><b>',' | <a href="?offset=all" title="All Posts on One Page">All</a></b></p>');

69 | Andrew

July 13th, 2004 at 6:39 pm


when i activate the plugin and add the code:

< ?php wpPaginate(); ?>

< ?php print_pg_navigation(); ?>

if ($posts) : foreach ($posts as $post) : start_wp(); ?>

when i now try and add a new blog entry i get this error:

Cannot modify header information – headers already sent by (output started at /home/virtual/site9/fst/var/www/html/square/wp-content/plugins/wpPaginate.php:97)

when i remove the code from the PHP file the error goes

I have editted the paginate file by just changing the number of entries shown per page

70 | Jennifer

July 14th, 2004 at 7:50 am


Andrew – see highlighed comment above. I've also modified the post to specifically address this issue.

71 | BukanSaya

July 18th, 2004 at 4:09 am


Is this plugin would automatically paginate my post? if not is there some customization for it? (from what i figure it only paginate my wp page that show posts not the page that show the post), i mean like this page .. if it was me i would like to make it several pages … well that kind of things that is my question.. is this plugin able to do it ? Thx, Sori for my terribel English.

72 | Jennifer

July 18th, 2004 at 8:19 am


You don't need a plugin to paginate a single post. Just use the <!–nextpage–> to seperate pages within a single post.

73 | BukanSaya

July 18th, 2004 at 4:58 pm


Mmm.. thx. I've noticed it, but you know what i want is the magic word "automatic", i mean i'm building weblog for my highschool alumni community & not all of them are good @ internet (not to mention scripting, & yet i'm too lazy to create a good FAQ :p ), and would it be nice if i could set that the post is automatically paginated when it reach certain parameter (like word count, or length). :)

74 | quayso

July 23rd, 2004 at 2:11 pm


I feel like a dunce, but I'm not getting anything at all, not even an error!

I've downloaded and installed the plugin in the plugin folder. I've activated the plugin. I've put this code in my index file:


<!– begin content –>

<div id="content">

<h1 id="header"><a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a></h1>

<?php wpPaginate(); ?>

<?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>


<?php endforeach; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>

<p><b><?php print_pg_navigation(); ?></b></p>


Thanks in advance for any help …

75 | Jennifer

July 23rd, 2004 at 3:59 pm


Do you have a link to where you have this running?

77 | frank

August 3rd, 2004 at 4:13 am



seems to be a great plugin. unfortunately i doesnt wórk in the way i tried it. i acitvate the plugin, add the php commands like you discribed and then i see only the blank code when i call the site. has somebody an advice for me?


78 | Ben

August 6th, 2004 at 1:52 pm


I am having a strange error.
When I go into one of the monthly archives, it appears fine. There are 4 pages with 20 posts per page (all working fine so far) except that when I am on page 1 and click on the link to page 2 it reloads page 1.
But it doesn't do that for any of the other pages… only page two.
It's happening with every month I test.

If I was to go to a page higher than 1 and click on page two however, it would go to page two.

Ahh that sounds a bit confusing. Essentially I can't get to Page 2 from Page 1. It treats clicking on the Page 2 link as if it's page 1 (only showing page 1's posts and making the Page 1 link unclickable).
This only happens when I am on Page 1.

79 | Jennifer

August 7th, 2004 at 8:03 am


(FYI – For those following along, I'm pretty sure Ben's problem has to do with it being an XP server… if I have time, I'll try to fix this – for now I wanted to note it as a "known bug")

80 | Stan Schwarz

August 13th, 2004 at 3:40 pm


I really like this plugin. Just one little problem. I imported a bunch of stuff into WordPress, and my category has 189 pages. This makes the navigation take up a lot of space on the page. So I hacked your script to add a feature so that it will print the navigation like this:

Page: 1|…|54|55|56|57|58|…|189

The current page is in the center, and it makes links for some number of pages on either side, along with links for page 1 and page N. You can see it in action on my test page at
If you want, I can mail you a patch or the whole hacked file. (It wasn't really a big modification.)

81 | Chan

August 16th, 2004 at 11:39 am


I get this error when updating template.

Warning: Cannot add header information – headers already sent by (output started at /home/httpd/vhosts/ in /home/httpd/vhosts/ on line 74

82 | Chan

August 16th, 2004 at 11:49 am


Sorry forgot to add more info. There is no spaces at first and last lines either. Just your code. Also added it code to call the plug in right after the require wp head code. I am using wordpress 1.2

83 | Jennifer

August 17th, 2004 at 12:15 am


Known bug: (working on fixing it) plugin doesn't work with "posts paged" option in reading options – only "posts" and "days" options.

84 | Jennifer

August 18th, 2004 at 2:38 pm


Actually, there is no way around it without major hacking: This plugin will not work with the WP 1.2 setting of "posts paged". WP 1.3 will be changing how that works a bit and it will be able to work in 1.3. I will need to do a minor update to the plugin – which I'll do once 1.3 is released. But because of this upcoming change for 1.3, it's not worth it for me to do that major work just to be compatible with WP 1.2 Posts Paged setting.

85 | Jennifer

August 18th, 2004 at 3:15 pm


Plugin updated to version .1 – Now includes Stan Schwarz changes so that pagination can be truncated if there are too many links. (This version is currently running on this site. Do a search for "test" to see it in action)

86 | Nick

August 25th, 2004 at 4:20 pm


Does this work when the index page isn't located in the wp folder?

I implemented it as said, but nothing…

87 | bwana

September 3rd, 2004 at 2:21 pm


great plugin(s). i've followed your progress from MT to WP and i'm glad you switched along with me. i still have to upgrade to the latest paginate to take advantage of some of these new features.

88 | Valerie

September 4th, 2004 at 8:31 am


There are so many comments here, I'm not sure if this has been discussed already or not.
I just upgraded WordPress to version 1.3-alpha-2 (nightly build August 30). Everything seems to be fine however I just noticed that wpPaginate is only showing two pages, one and then one more. Then it just acts like there are 20 posts.
?????? eh ??????

89 | Jennifer

September 4th, 2004 at 9:18 am


To my knowledge, the current version (v .1.1 will not work with WP 1.3) I will update it and make it compatible, I'm just waiting until 1.3 is closer to a release date (or is actually released).

90 | Valerie

September 4th, 2004 at 10:11 am


Okay, I deactivated the plug in and removed the calls to it from my index file. Now I am not getting any errors but it is still only pulling like the first 15-20 posts of a category. Is this a left-over issue with having used the plugin before, or a 1.3-alpha-2 problem? (Btw, I used the plugin with 1.3-pre-alpha just fine…)

91 | Jennifer

September 4th, 2004 at 11:05 am


If you deactivated the plugin and removed the wpPaginate specific code – then there shouldn't be any "residual" issues because of it. I know they're changing the way the whole posts per page vs posts-paged thing is working (which is why I know I'll need to update my plugin) – but it sounds like maybe an it's an alpha issue… Maybe log it as bug on the bug tracker (or look to see if it's been logged) and see what they say…

92 | Valerie

September 9th, 2004 at 9:58 am


As an update…
This plug-in is kind of built into WP1.3-alpha-2, and that's how I messed things up.
There's apparently a snippet in the new index file:
<?php posts_nav_link(' — ', __('« Previous Page'), __('Next Page »')); ?>
That gives you a previous and next, using however many you've chosen to view on the front page per new page.
Because I missed this change and kept my old index files, WP had no way to go to the next page of posts (earlier).
See what I mean?
So is all good now. ;-)

93 | iddapidda

November 3rd, 2004 at 9:41 am


Hello and thank you for all your hard work that is making all of our lives so much easier :-)

I´ve been wondering about pagination in the "edit" part of the admin section. For example in the comments section or archives, only a certain number of posts are displayed. Is there any way around that? Such as "next page" or so?

I have been looking around for solutions to this problem but so far have found none..

94 | sloh

November 7th, 2004 at 2:11 am


I installed it and it screws things up. The navigation appears only at the top left corner over my header background image. There is no navigation at the bottom. I was hoping the navigation would show up in the body above the first post.

95 | Jennifer

November 7th, 2004 at 10:41 am


sloh – this sounds like a css issue with your layout and a problem with WHERE you placed the code in your template… but more than that, I can't even begin to guess because you didn't provide enough information. (your URL, a link to a text file for your code?) If you really want to fix the problem, you can try emailing me: scripty at scriptygoddess dot com

96 | whoo

December 7th, 2004 at 6:31 am


this looks like a great plugin, but i cant seem to get the right setting to have it paginate when im NOT looking at archives. I originally was using the the "posts paged" option. what setting does it need to be set at to start paginating at index.php?

97 | Jen

January 5th, 2005 at 12:55 am


Nice plugin!


98 | Tom Kirchner

January 11th, 2005 at 10:34 am


Thanks for the plugin! Works great and really helps cut down on the huge queries.

99 | Jack

January 18th, 2005 at 4:26 pm


Any chance you'll be upgrading the plugin soon for use with 1.5? I've gotten so depended in this plugin (just the 'previous' and 'next' page is really too little when you have al lot of pages), and we're already on 1.5 beta! ;-) , so you don't have to wait until 1.3 comes out.

100 | Jennifer

January 18th, 2005 at 4:31 pm


Well – I have the best of intentions to… but the time? not sure about that. I know I'm going to want it when I finally upgrade my blogs… so yes. At some point – relatively soon. ;-)

101 | Jack

January 18th, 2005 at 5:44 pm


"…I have the best of intentions to…"

I know you have :) , so I'll have to be patient, for me not so into phpee :( .

102 | Jennifer

January 23rd, 2005 at 5:44 pm


Ok ok! We got a ton of snow here and I had nothing better to do so – I've updated the plugin for WP 1.5. For those of you that are subscribed to comments here – I'm closing comments down here and all information about the updated plugin can be found here.

Featured Sponsors

Genesis Framework for WordPress

Advertise Here

  • Scott: Just moved changed the site URL as WP's installed in a subfolder. Cookie clearance worked for me. Thanks!
  • Stephen Lareau: Hi great blog thanks. Just thought I would add that it helps to put target = like this:1-800-555-1212 and
  • Cord Blomquist: Jennifer, you may want to check out, a new service my company just launched that converts TypePad and Movable Type export files into WordPre