Please note that the information in this post may no longer be accurate or up to date. I recommend checking more recent posts or official documentation for the most current information on this topic. This post has not been updated and is being kept for archival purposes.

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:

query_posts( array( 'cat' => 8, 'paged' => get_query_var('paged') ) );

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!

Similar Posts