Custom Taxonomy archive pagination doesn't work (404 error)

  • Resolved
    Posted in: Boldial WP  

  • Member
    JaraJara
    March 30, 2015 at 2:22 am #7523

    I was trying to find the reason why this is happening and finally found the issue, but I don’t know how to solve it.

    USAGE:
    I registered in my WP a custom Custom Post Type and a Taxonomy (“professions”). All is working fine and I managed to create a “taxonomy.php” derivative copy of this file (in fact I did a copy of the “taxonomy-portfolio-category.php” as an image to work on, in order to be called by WP correctly. So I created a “taxonomy-professions.php” file.]

    All is fine and working, but the pagination process.

    At first I tought that it was a problem with the pagination/whatever, so I installed a pagination plugin and the problem is still the same. In the first page of all taxonomies, all is fine, even with the pagination calculation numbers:

    But when you click on Page 2, a 404 error shows up (page not found).

    I tought that the problem was realted with my permalinks, so I deactivated them, so the structure in my tests are:
    https://www.mywebsite.com/?professions=management-occupations

    And the access url to the second page is:
    https://www.mywebsite.com/?professions=management-occupations&paged=2

    And still this way, a 404 error is showing up…

    Banging my head all the way during hours I found the cause: for some reason, the “Page 2” page loading is calling a WP query with the post_type called “portfolio-category”.

    Please see a dump of “query_vars” of the first page, correctly called with my custom taxonomy data.
    PAGE 1 Dump:

    PAGE 2 Dump (404 Error):

    How can I solve this?

    Thanks!
    ;)

    Sorry, this forum is for verified users only. Please Login / Register to continue
    or get 6 months support forum access to all forum topics for a reduced price.

Comments are closed.