3.1 RC2: Custom post type archive by date (3 posts)

  1. Anna Ladoshkina
    Posted 5 years ago #

    I've tested new custom post type archive template feature and it's working pretty fine for me, but as far as I can find out there is still no way to obtain date-based archive page for custom post type:

    when adding year, month, date etc. parameters for request - the CPT ignored or 404 returned, so I can not find a way to make it work without additional hacking to request process.

    Am I missing something and is that feature planing to be done for future?

  2. Rev. Voodoo
    Posted 5 years ago #

    CPT archives in general seem to get pretty wonky to me.

    Date based, category based or author based..... similar issues to what you are saying

  3. Anna Ladoshkina
    Posted 5 years ago #

    @Rev. Voodoo
    you're right with that, but taxonomy-based or author-based archives could be quite easily build by forking appropriate taxonomy or author.php templates and modifying query object there (probably not in all cases, but in some at least).
    That's a bit hacky but as a temporary solution could be OK. Unfortunately for date archive it does not work and it's necessary to filter the request parsing process (it's how I finally achive that) to build the date archive for CPT.

    So presently only basic index for CPT works "out-of-the-box"... I think that's a great motion from the 3.0 state but it's not enough unfortunately :)

Topic Closed

This topic has been closed to new replies.

About this Topic