CPT Monthly Archive URL - What should it be? (5 posts)

  1. FranklynJones
    Posted 3 years ago #


    I have a CPT and working archive page (archive-cpt.php) - found at localhost/cpt

    Running <?php wp_get_archives('type=monthly'); ?> in the template, returns the correct number of months for the CPTs but the link is a 404.

    It goes to regular posts, localhost/2012/02 - what should the URL be? For my CPT month archive page

    localhost/cpt/year/month does not work.

    Any help would be great!


  2. Rev. Voodoo
    Posted 3 years ago #

    have you flushed your rewrite rules?
    Can be done by code or manually

    Its necessary after adding CPTs to ensure everything works correctly, otherwise you tend to get the 404s

  3. FranklynJones
    Posted 3 years ago #

    I have flushed them by going to the Permalinks setting page and saving them, if that's what you mean.

    Do you know what the correct URL should be for the monthly archives?

  4. Rev. Voodoo
    Posted 3 years ago #


    Seems like a pretty useful series of articles. Seems that (possibly) there is no monthly archive for a CPT by URL

    Ive honestly never even tried to get to a monthly archive with my CPTs before, so I'd never noticed that!

  5. FranklynJones
    Posted 3 years ago #

    Thanks very much for the help, yes I discovered these pages too, but just keep coming up with the same issue. I've posted this problem in several different places and I'm not finding a solution..

    I think I need to figure out another method.

    Cheers again,

Topic Closed

This topic has been closed to new replies.

About this Topic