WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] paginating custom post types on a static page (4 posts)

  1. DrLightman
    Member
    Posted 2 years ago #

    Hello, I want to paginate custom typed posts on a static page:

    /companies/
    /companies/page/2/
    /companies/page/3/
    ...

    But the /page/2/ /page/3/ all give me 404 page not found?

    Here is the loop of the template "Companies" used for the static page Companies:

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

    More/Previous link shows fine, but if I click them I get 404 page not Found!

  2. AmirHelzer
    Member
    Posted 2 years ago #

    Try with default permalink structure. This will tell if the problem is in the URLs or in the loop.

  3. DrLightman
    Member
    Posted 2 years ago #

    With default permalink structure it does work as expected.

  4. DrLightman
    Member
    Posted 2 years ago #

    Wait, thanks to your reply I checked the name of the page and it was the same of the plural fo the custom post type I'm using, so this conflict lead to the 404. Changing the slug of the page to something else fixed it.

Topic Closed

This topic has been closed to new replies.

About this Topic