Custom post type URL rewrite (4 posts)

  1. anithegregorian
    Posted 5 years ago #

    Hi everyone,

    Lately with WP 3.0.1 the possibilities are limitless for creating custom content types. Im experimenting it with an on going project where they have "Services" section for which I created "Our Services" a custom content type.

    Everything looks fine and works well until I try and access the posts under this CCT (Custom Content Type) like:


    Usually this should by default show all the posts from this CCT ie. our-services, but it doesn't and pops out with Nothing found and the default search template. Something is wrong with the setup of CCT or this is an issue with WP...

    Thanks in advance

  2. Mark / t31os

    Posted 5 years ago #

    Goto the permalinks settings page and hit save..

    When you're adding new post types yourself there isn't any regeneration of the rewrite rules, hitting save on the permalink page will regenerate the rewrite rules.. (including any for your post types).

    NOTE: You need to do that any time you make changes to the rewrite parameters of a post type you are registering or add a new one.

  3. anithegregorian
    Posted 5 years ago #

    @Mark: Already tried that, but I got this one from IRC. There are no default templates for custom post type archives, so a very generous person suggested me to:


    And that worked like charm :)

  4. Mark / t31os

    Posted 5 years ago #

    I should of spotted that really... ;)

    Certainly, archives for custom post types do not exist as standard, because well... they're custom, if you want them to have one(an archive) you have to create one for them.

    Happy to hear you found a solution though... :)

Topic Closed

This topic has been closed to new replies.

About this Topic