Rewrite rules for single posts ONLY (2 posts)

  1. ryan4021
    Posted 3 years ago #


    I have a question... I want to make it to where it ONLY adds a category base for posts, but excludes EVERY OTHER post type besides 'posts'.

    I have one custom post type called 'listing-type' , which i have successfully removed, which is good. But it also removes the category base for default blog posts. I'd like it to have it show a category base when viewing posts (site.com/blogcategory/blogpost) but for listings i do not want a categor ybase (site.com/listingname) , the archive obviously needs to carry the tag (site.com/archivecategory) so that can stay the same.

    Is this possible with regex and rewrite rules?

    I'm using SEO Ultimate to remove the category bases currently, but if i try to do it for just posts and not listings , it adds it to listings regardless.


  2. ryan4021
    Posted 3 years ago #

    I'll answer myself on this one.

    Without it getting too complicated and end up having to rewrite the entire WP Rewrite to simply reroute requests with listing-type to ones without gets real complex especially for this use case because when you remove listing-type , it now looks like a category slug. wordpress doesnt know what to choose at this point.

    Solution was go with separate categories blog dsection, separate categories for listing section and that solved it.

Topic Closed

This topic has been closed to new replies.

About this Topic