Some posts returning 404 instead of displaying post

As I mentioned in my comment, the date rewrite rule is picking up your post permalink and trying to load a year archive instead of your single post. Since it appears you don’t use date URLs on your site, you can change the date structure so it no longer clashes. Add this to your theme’s functions.php file, then visit the Settings > Permalinks page in Admin to flush the rewrite rules:

function wpa82820_date_structure(){
    global $wp_rewrite;
    $wp_rewrite->date_structure="date/%year%/%monthnum%/%day%";
}
add_action( 'init', 'wpa82820_date_structure' );

This changes date URLs from /2013/01/23/ to /date/2013/01/23/ so they no longer clash with 4 digit single post permalinks.

Leave a Comment