WordPress.org

Forums

Custom Post Type UI
[resolved] Removing "post_type" from permalink / URL (6 posts)

  1. dberz
    Member
    Posted 2 years ago #

    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/

  2. Michael Beckwith
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  3. Avery1
    Member
    Posted 1 year ago #

    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!

  4. Michael Beckwith
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  5. Avery1
    Member
    Posted 1 year ago #

    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/

  6. Michael Beckwith
    Member
    Plugin Author

    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Custom Post Type UI
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic