WordPress.org

Ready to get started?Download WordPress

Forums

Custom Post Permalinks
[resolved] Archive Tempaltes? (9 posts)

  1. romanczar
    Member
    Posted 3 years ago #

    Hi,

    how can I have a custom archive tempalte for my post types?

    Thanks!
    Czar

  2. John P. Bloch
    Member
    Plugin Author

    Posted 3 years ago #

    This is entirely out of the scope of my plugin. The only real answer I can give to this question is "however you want." I know Matt Wiebe at somadesign.ca had an inventive way, and I know they're going to roll this out in a future version, but any answer for this question would be so subjective and depend on your particular site and theme, as well as the particular implementation of custom post types.

  3. romanczar
    Member
    Posted 3 years ago #

    Hm... that is a pitty...

    Another question: I can get the yearly archive to load. I have a custom child theme based on 2010 base. But: only yearly archives work, no monthly archive. I just added 1 custom post entry, but I guess that should not be the point. I get a 404 when e.g. calling "../blog/2010/09" where "blog" is my post type. ".../blog/2010/" works fine. Any idea?

  4. John P. Bloch
    Member
    Plugin Author

    Posted 3 years ago #

    Hmmm... Off the top of my head, I can't see anything out of the ordinary. It would help if I knew a few things about the site:

    1. What is the permastruct you're entering for the post type?
    2. Is your site multisite? If yes is it using:
      1. subdomains, or
      2. subdirectories
  5. romanczar
    Member
    Posted 3 years ago #

    No multisite.

    Permalink desired would be domain.com/blog/2010/09/blog-post-name

    Permalink for "normal" posts is similar, but /%category%/%year%/%month%/%postname%/

  6. John P. Bloch
    Member
    Plugin Author

    Posted 3 years ago #

    Gotcha. The permalink tag for months is %monthnum% not %month% (at least for my plugin. I'm fairly certain that's how it works for core too). If you use that, it should work.

  7. romanczar
    Member
    Posted 3 years ago #

    Sorry... I should have checked before writing, but I actually HAVE /blog/%year%/%monthnum%/%blog% So the code is correct. And also the normal post link works.

    Only monthly archives don't... I could live with that, as long as there was no 404...

  8. John P. Bloch
    Member
    Plugin Author

    Posted 3 years ago #

    I'm not sure if this will work, but try changing blog to %post_type%. That is, /%post_type%/%year%/%monthnum%/%blog%.

    Also, can you view single posts with your structure?

  9. romanczar
    Member
    Posted 3 years ago #

    That worked! Thanks!

    Small hickup: no daily archives, but no problem for me.

    Big question: how can I use custom templates now for these post types.... will have to play a lot I guess

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic