Support » Fixing WordPress » paging not working?

  • First, thanks in advance if you can help me with this. The site is schoonermaggieb.net I am using the latest version (2.0.2) of WP.

    If you look on the homepage and click the “read more” link under the paragraphs for “Chart Us” it takes you to a top level category page for “Chart Us” where all posts for any of the subcategories are displayed…

    I have my WP admin options set up to show just 5 posts on a page. In Chart Us, there are now 6 posts total… and the limitation is working… BUT, clicking the next page link results in a page that says “no posts”

    Where’s the 6th post? Why isn’t it displaying it? The link that shows in the status bar shows as:

    http://schoonermaggieb.net/chart-us/page/2/

    Is there a specific template file that shows a “second page”? This category (Chart Us) uses a category-#.php special template but the loop is the same pretty much as my index and other pages.

Viewing 13 replies - 1 through 13 (of 13 total)
  • Am I doing something that is offending people or can no one here give me some idea why the code for paging isn’t working here:

    http://schoonermaggieb.net/chart-us

    ??

    I’ve tried both:


    <?php posts_nav_link(' — ', __('« Previous Page'), __('Next Page »')); ?>

    and:


    <div class="navigation">
    <div class="alignleft"><?php posts_nav_link('','','« Previous Entries') ?></div>
    <div class="alignright"><?php posts_nav_link('','Next Entries »','') ?></div>
    </div>

    but in both cases, clicking produces the page with a “no matching posts” message – but there ARE more than the 5 posts shown on the page…

    Ideas, please???

    My very first idea: What did you modify in the core files that WP doesn’t use the “category” for the permalinks as it is supposed to for the Category Base?

    Clues. If you look at the links at the bottom of your pages you can see a missing (virtual) directory:
    yourdomain.com//chart-us
    And, if inserting “category in the address bar for
    yourdomain.com/category/chart-us suddenly everyhting works .

    See*** below

    moshu wrote:

    My very first idea: What did you modify in the core files that WP doesn’t use the “category” for the permalinks as it is supposed to for the Category Base?

    ***I am not sure what you mean. I set up my “friendly” urls to use /%category%/%author%/%postname%/

    Is that incorrect? Is this what you are asking me? “chart-us” IS the category

    Clues. If you look at the links at the bottom of your pages you can see a missing (virtual) directory: yourdomain.com//chart-us And, if inserting “category in the address bar for yourdomain.com/category/chart-us suddenly everyhting works .

    If I use copy link location from the browser (for the next page link), the link is:
    http://schoonermaggieb.net/chart-us/page/2/

    which is using chart-us

    what I don’t get is what is /page/2/ all about? Is there a file used for this that might be missing (I have a page.php file and an archive.php file)

    Sorry to be so clueless about this – it’s hard to find help in the documentation when the search functions don’t work well and this is my first WordPress site.

    Thanks for your help! I really appreciate all knowledge you can send my way. If you need specific information to help, just tell me what and where and how to get it for you.

    Hmmm… I noticed in the documentation for permalinks:
    ——————
    Note on using %category% with multiple categories on a post
    Where you assign multiple categories to a post, only 1 can show up in the permalink. This will be the lowest numbered category (see Manage Categories). The post will still be accessible through all the categories as normal.
    ——————

    Given that some of these posts are in two categories, could this be the issue? Would removing /%category%/ from the custom permalink structure fix it?

    And what happens if I remove the /%category%/ portion of the custom permalink structure now that the posts already exist?

    OK, I think I know what’s wrong now:
    ————–
    Paged Navigation Doesn’t Work
    Sometimes navigation to second (and subsequent) pages of posts does not work as expected. Your page may generate a link to a page with one of these URIs:
    http://www.example.com/page/2/ http://www.example.name/category/categoryname/page/2/
    http://www.example/year/month/day/page/2/
    http://www.example/year/month/page/2/

    The result of clicking one of those links is that the page loads with all the surroundings (header, footer, sidebar), but instead of a page of posts, there is an error message: “Sorry, no posts match that criteria.”

    This is due to a glitch in the .htaccess file that WordPress generates. To fix it, delete the contents of your .htaccess file and re-create it.
    ——————-

    I’m going to try to fix this using the directions provided.

    1. On the permalink settings page there is another field at the bottom (rarely noticed by users 🙂
    called “Category Base”.
    2. Normally, if you don’t touch that filed WP would create permalinks like this for categories:
    http://schoonermaggieb.net/category/chart-us/
    and if you try this address – the nexp/prev works! (as I said above, you just didn’t check it…)
    3. My question was: what did you modify that WP does NOT use the category base? And creates wrong addresses at the bottom of your page.
    Check out all those links at the bottom: except home they all have an “empty” folder http://schoonermaggieb.net//chart-us – notice the double //

    Hmmm… didn’t fix anything. Darn.

    But I noticed that my archive links ARE working (next page, etc) but the url reads:

    http://schoonermaggieb.net/2006/03/page/3/

    (for example)

    So, does that information provide anything in terms of why? Do you think that the problem is that the chart-us posts are from multiple categories.

    The thing is, the lowest post number IS chart-us… the other categories have higher ID numbers

    Sorry, the footer links really don’t have anything to do with this… I just updated that file and now you won’t see the // you were seeing (my bad).

    The issue is when you go to http://www.schoonermaggieb.net/chart-us/

    (chart-us) is a category.

    It displays the correct posts , but these are all posts that are in multiple categories (chart-us, where-we’ve-been, where-we’re-headed, and on-the-map), just fyi.

    So, when you click the next page link (at the bottom below the 5 posts) which links to :
    http://schoonermaggieb.net/chart-us/page/2/
    instead of showing the other 4-5 posts, it says there are no posts.
    1) Where is the /page/2/ coming from?
    2) Can I change it somehow?
    3) Is there some way to simply write a link (instead of using the default next/prev code) that calls the category-28.php page (chart-us) and displays all the posts from the pertinent categories? (9, 10, 27, 28)

    I realize now that normally, sub-categories would be higher numbers than the parent category… but in my case (messing around with creating/deleting/recreating categories) they aren’t.

    The issue is when you go to http://www.schoonermaggieb.net/chart-us/
    (chart-us) is a category.

    That’s the only thing I am trying to tell you: this is the issue. The above category link is not correct!
    It should be:
    http://www.schoonermaggieb.net/category/chart-us/ <== notice the word “category” between the domain and chart-us.
    There is something wrong with either your install or your permalinks or God knows what.
    You are not supposed to have a category link as you have it – without a category base word. With “category” in it the next/prev works (I am saying it the second time).

    sorry that I am being dense. I’m not trying to be. If I understood this, I wouldn’t be asking questions or needing help and I do appreciate your help…

    I didn’t realize that /category/ was just that word exactly. I thought it was to be replaced with the category name.

    thanks for your help, it seems if I fix my nav menu’s links to put /category/ before the category name, things do work!

    thank you so much.

    And now I am starting to understand it better, too 🙂
    I didn’t think of the fact that those links in your sidebar (nav) might be manually made… I was wondering why on the earth WP creates wrong links to the categories – hence my obsession with the “what did you change in the core files”.

    Actually the word “category” is inserted by WP by default. If you want to change it to something else you have to put that “something else” into the Category Base field in the admin > Options > Permalinks.

    I could not figure out how to get the categories to display dynamically with the html structure I wanted…(the nav menu)… given that the client is not going to ever add a category… I opted to just manually link to the categories. I just didn’t realize that I had to add the /%category%/ bit before the name of the category.

    Thanks again for your help (and persistence!)

    Hi, moshu… sorry to bug you again, but I have a related question. Same site: http://schoonermaggieb.net

    I have set up a “bread crumb” page title trail in my pages (for instance, the Ship’s Library pages) so that if you click to go to SnapShots (using the menu in the left sidebar) the page “title” looks like:

    Ship’s Library >> Snap Shots >>

    The link up (ship’s library) is working, thanks to the insight you provided in this thread… but here’s an odd thing… on the snapshots page, one of the posts includes a link that opens a slideshowpro flash slide show. That works ok (still need to tweak it a bit) BUT, if you click UP (on the Ship’s Library breadcrumb link) that post’s link is no longer there! The TEXT of it is, but the link is missing.

    Any ideas about that? I’ve noticed that happening using excerpts as well – if I set my category templates to use the_excerpt rather than the_content html formatting goes missing – for example, strong or em tags display in the excerpt but when you click to see all of the post, they don’t.

    What’s that all about?

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘paging not working?’ is closed to new replies.