Custom Post Permalinks
Archives are not created (3 posts)

  1. Milan Dinić
    Posted 5 years ago #

    As I already said on your blog, although I can access single post, other archives are not available. Nothing change with new version you introduced in the meantime.


  2. John P. Bloch
    Plugin Author

    Posted 5 years ago #

    Use %post_type% instead of just something. Plain text means nothing to the rewrite engine. You have to have rewrite tags to insert meaningful data into the structure. Your current permalink (except for single views) is basically telling WordPress to get your posts' archives because you don't have %post_type% anchoring the whole structure telling WP to look for that post type.

  3. Milan Dinić
    Posted 5 years ago #

    By reading documentation on various places (repository, your blog, plugin's settings), I didn't conclude that permalink structure for custom post type needs to start with %post_type%.

    Anyway, I tried various changes, and although some things started to work, neither made everything to work.

    • /%post_type%/blog/%year%/%monthnum%/%something_post%/ - it made month and year archives work, but when I access example.com/post_type/blog/ I get a blank page; some notices: example.com/post_type/blog regularly redirects to example.com/post_type/blog/, and example.com/post_type/blog/feed/ works
    • since my custom post type has underscore in name, I tried with 'slug' => 'something', under rewrite in register_post_type; it did make something instead of post_type but example.com/something/blog/ still didn't work (as above), plus I got a blank page when i go to example.com/something, which is standard WordPress page.
    • when I tried to change blog with anything, in both above cases everything was the same, so it wasn't problem with use of blog (which is already used for standard posts)

    Any idea on a way to achieve what I want, or that is impossible?


Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic