Support » Themes and Templates » Date based Custom Post Type Archives

  • Resolved fonglh



    I’m using a child theme of twentyten. redirects to archive-cpt.php as expected, but goes straight to the 404 page.

    As far as I know, it was working just yesterday and I haven’t changed anything. It looks like the permalinks stopped working properly as printing the query array on the 404 page gives Array ( [page] => /02 [cpt] => 2011 [post_type] => cpt [name] => 2011 )

    How can I force it to write the correct query like it does for built in posts?

    I’ve already tried refreshing the permalink settings but the problem still persists.

Viewing 4 replies - 1 through 4 (of 4 total)
  • I’ve figured it out. Rewrite rules have to be added. I modified the code from the Custom Post Types plugin.

    I think what happened was that I didn’t refresh the permalinks when I deactivated the plugin and just assumed everything was working. So when I refreshed them again they all got lost.

    Can you enlighten me on how you accomplished this? I would like to do something similar. Specifically the rewrite rules that you used?

    I have a series of blog posts about it. It’s not meant to be a tutorial, instead it’s a record of what I tried to get it working. The first post is at the link below.

    Custom Post Type Archives

    I have made a little PHP class that register CPT with support of archives by dates.

    You can found it there : WP Custom Post Type with archives per dates

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Date based Custom Post Type Archives’ is closed to new replies.