Support » Plugins and Hacks » Hacks » Using the CPT slug in custom rewrites

Using the CPT slug in custom rewrites

  • I have this rewrite rule


    It uses the ID of the post type, rather than the post type slug. I’ve dug around and can’t find a way around this.

    For example, for post type “Bar None” with the id “bar_none” and slug “bar-none”.
    site.com/category/foo/feed/rss2/bar-none/ doesn’t work
    site.com/category/foo/feed/rss2/bar_none/ does

    site.com/bar-none/ works
    site.com/bar_none/ doesn’t

    So what intermediary step am I missing the get the slug to work in the rewrite URL?

  • The topic ‘Using the CPT slug in custom rewrites’ is closed to new replies.