• Resolved dberz

    (@dberz)


    Hello –

    I created a new custom post type called “custom_event”, and I’d like to remove the post type from the URL string.

    Current URL:
    site.com/custom_event/post_name

    Desired URL:
    site.com/post_name

    What’s the best way to do this?

    Thank you,
    D

    https://wordpress.org/plugins/custom-post-type-ui/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Hi dberz, did you check out the “advanced options” section of the plugin? You should be able to set a custom rewrite slug to use with your CPT.

    I’ve got the same issue. Assuming that “Advanced Options” is the same as Settings, not sure what to change. I see “Custom Rewrite Slug” which is currently “default: taxonomy name”. “Rewrite With Front” is set to true, and “Rewrite Hierarchical” is set to false. How exactly do I set a custom rewrite slug where the “post type” is not displayed in the urls. Thanks!

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Just to be certain Avery1, are you having the issue with post types you’ve created, or taxonomies? Because they will be potentially different in solution.

    Taxonomy. I’ve only got one custom post type. Because I’m not using a static front page, and there will be no posts on it, your plugin (along with Menus) has allowed me to list the services we offer under a more appropriate page.. as posts (vs child-pages). Thanks!

    My permalinks/urls are:
    http //:MySite/custom_post_type/my_custom_posts/

    and if possible I’d like them to be:
    http //:MySite/my_custom_posts/

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    still sounds like you’re mixing up post types and taxonomies

    “I see “Custom Rewrite Slug” which is currently “default: taxonomy name”. “Rewrite With Front” is set to true, and “Rewrite Hierarchical” is set to false.”

    The fact that your pasted note involves “default: taxonomy name” says you were looking at the taxonomy settings and not the post type settings. However, the URLs you’re mentioning talk about post types, and not taxonomies.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Removing "post_type" from permalink / URL’ is closed to new replies.