Devin Walker is a San Diego based entrepreneur, developer and designer.

Custom Post Type Archive Template Pagination 404 Error Fix

Posted on Aug 15, 2012 in Coding, Web Development, WordPress | 3 Comments

I like to create custom post types to better organize my website’s content.  There are many great plugins to help you create custom post types without code.  A few times I have run into 404 errors when creating custom archive templates for my custom post types with pagination set up.  Here’s a few checks I do that typically solves my issue after receiving a 404 error:

1. If you are only testing pagination out and are using the ‘posts_per_page’ argument to limit the number of results this will conflict with WordPress’ default settings of 10 posts per page.   If you are testing pagination go to Settings > Reading in the admin dashboard and change “Blog pages show at most” to 1.

WordPress Blog Posts Per Page

2. Are you using query_posts properly?  Take at this article by scribu (author of wp-pagenavi) about how to properly use query_posts properly.  In summary, the code looks like this:

3. Double-check your code or plugin settings that you have indeed enabled archives with the has_archive parameter when you registered your post type.

Has Archive

4. If you have a page or post with the same slug as your custom post type name this can often cause issues. Check to see if this is the case and see if renaming that page or post’s slug fixes the 404 errors.

Problem still not solved?  Take a look at How to Resolve WordPress Custom Post Type 404 Error Issues which is an article I wrote awhile back with some more tips.

Hopefully this provides you with a resolution! WordPress is great; it can be a little finicky but we still love it!


  1. Alain
    March 4, 2014

    I love you man ! 😉 thanks

  2. Lucas
    January 24, 2016

    Thanks! Man

  3. Yvonne
    March 20, 2016

    I cannot thank you more on your tips!! I have been searching for solutions for more than 10 hours to fix it but with no luck! But just simple one tick on “has archive” and everything is solved!! Thank you so much!!