Custom Post Type Archives
[resolved] Custom Permalink Issues (2 posts)

  1. onetrev
    Posted 4 years ago #

    This is both a question and information to save someone the pain I went through.

    If you have the WordPress - Settings - Permalinks - "Custom Structure" set to something hard coded like: /news/%postname%/ then the archive links for your custom post types do not work!

    What happens is the hard coded URL gets appending to whatever custom post archive rewrite URL you've set. For example if you have an Event post type, set to rewrite to /events/ the URL for the archives is generated as /events/news/2012/02. Notice the "news" being added to the URL.

    You can fix this problem by simply having an entirely dynamic URL in your Permalink setting, ex: /%postname%/.

    However, if you have your regular post type / blog setup as a sub-folder you then can't have that folder display in the URL. This is not the end of the world, but it's less than ideal. It means when the user is in say http://www.site.com/news/ but when they click on archives they get a root URL of just http://www.site.com/2012/02/. But then for your custom post type archives they get nice subfolder URLs. We should be able to have it for post standard and CPTs.

    Is there any way to fix this?? Thank you so much in advance.

  2. onetrev
    Posted 4 years ago #

    Just in case someone is looking, this issue was solved by some kind person -- the solution can be found in this other support post:


    If only the plugin could be updated by the developer now, as this bug caused me so much trouble. However, it's still hard to believe monthly/yearly CPT archive functionality still isn't built into the core WP wp_get_archives() function.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Custom Post Type Archives
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic