WordPress.org

Ready to get started?Download WordPress

Forums

Posts will not show on second page...... (10 posts)

  1. karl3169
    Member
    Posted 5 years ago #

    Hi all,

    im in the middle of creating a WordPress theme and have come across a problem with posts.

    I have set the "Blog pages show at most...." to 10 posts and have a category with over 20 posts assigned to it. As WordPress does, it has added the links to the bottom of the page linking to the next page of posts... great.

    For some reason, when i click the link, the rest of the posts don't seem to show?

    I have set up a permalink structure of /%category%/%postname% and when i remove the category name from the address bar and leave the /page/2 part of the URL, it seems to work.

    Does anyone know why this problem is occurring and if there is any way to fix it?

    unfortunately, I am working locally at the moment so there is no link i can post.

    Thanks for any help or suggestions...

  2. soopahjoe
    Member
    Posted 5 years ago #

    I've been experiencing something similar with my wordpress blog.

    http://wordpress.org/support/topic/218911?replies=1

    It might just be the way my theme was made, but I'm not sure.

  3. karl3169
    Member
    Posted 5 years ago #

    Me neither about mine, im desperate for help though... im not sure where to start!

  4. moshu
    Member
    Posted 5 years ago #

    Start by giving a link.
    Because the single posts' permalink that you were talking about... have nothing to do with the next/prev navigation on your category archives.

  5. karl3169
    Member
    Posted 5 years ago #

    Im working locally at the moment so there is no link that i can give. would it be helpful if i post a link to the code?

  6. moshu
    Member
    Posted 5 years ago #

    Well, most of the time what happens on a localhost is irrelevant because most localhosts are not set up as correctly as a professionally managed server.

    Next, no, the code wouldn't help too much.

    What template file is used to display your category archive? How is it different from the index, for example (which, according to you, works correctly)

  7. karl3169
    Member
    Posted 5 years ago #

    Let me just say that im not the most experienced in creating wordpress themes, you help is much appreciated. This could be something or nothing.....

    I think index.php is generating the page for the posts that i am showing on the first page but doesn't generate the next page(s)

  8. moshu
    Member
    Posted 5 years ago #

    You just said above:

    when i remove the category name from the address bar and leave the /page/2 part of the URL, it seems to work.

    In my books that means, you have a URL like this:
    example.com/category/category-name/page/2
    when you try to go to the second page of the category archives.

    In normal conditions the first page of a category archives MUST be like this (if using nice permalinks)

    example.com/category/category/name
    (and again: this has nothing to do with what you set as nice permalink for the single post!!!)

    So, if the category archive first page doesn't have the URL above, then everything is wrong from start.

  9. moshu
    Member
    Posted 5 years ago #

    And if you want to make your own theme you should know this by heart: Template_Hierarchy

  10. karl3169
    Member
    Posted 5 years ago #

    Thanks for your help, i managed to fix the problem.

    I had a custom dropdown on my homepage that didnt add the /category/ part of the URL.

    the theme is fine, everything works ok now.

    thanks for your help!

Topic Closed

This topic has been closed to new replies.

About this Topic