Title: Permalink
Last modified: April 6, 2020

---

# Permalink

 *  Resolved [federicavecchi](https://wordpress.org/support/users/federicavecchi/)
 * (@federicavecchi)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/permalink-102/)
 * Hi,
    I’ve a problem with permalink. I create two custom post type ( Custom Post
   Type UI v.1.7.4 ) Post type settings: function cptui_register_my_cpts_myd_events(){
   $args = [ “label” => __( “Iniziative”, “custom-post-type-ui” ), “show_in_rest”
   => true, “rest_base” => “”, “rest_controller_class” => “WP_REST_Posts_Controller”,“
   has_archive” => true, “hierarchical” => false, “rewrite” => [ “slug” => “come-
   sostenerci/eventi/%myd_events_type%”, “with_front” => false ], “supports” => [“
   title”, “editor”, “thumbnail”, “custom-fields”, “author”, “page-attributes” ],“
   taxonomies” => [ “myd_events_type” ], ]; }
 * function cptui_register_my_cpts_myd_manifestations() {
 *  $args = [
    “label” => __( “Manifestazioni”, “custom-post-type-ui” ), “show_in_rest”
   => true, “rest_base” => “”, “rest_controller_class” => “WP_REST_Posts_Controller”,“
   has_archive” => true, “hierarchical” => false, “rewrite” => [ “slug” => “come-
   sostenerci/eventi/%myd_manifestation_type%”, “with_front” => false ], “query_var”
   => true, “menu_icon” => “dashicons-calendar”, “supports” => [ “title”, “editor”,“
   thumbnail”, “custom-fields”, “author”, “page-attributes” ], “taxonomies” => [“
   myd_manifestation_type” ], ];
 *  register_post_type( “myd_manifestations”, $args );
    }
 * first permalink doesn’t work go to 404 page.
    Second permalink works.
 * If I change proprierties “hierarchical” on second post type, it stops working
   but the first works.
 * I use WordPress v. 5.4
 * Thanks.

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [6 years, 2 months ago](https://wordpress.org/support/topic/permalink-102/#post-12635091)
 * If I had to hedge a bet, it looks like you’re trying to get taxonomy slugs inside
   some post type permalinks, correct?
 * Which leaves me wondering what “/come-sostenerci/eventi/” is supposed to represent
   here.
 * Regardless, despite seeming to work part of the time, the post type rewrite slug
   field is not the appropriate place to be dropping in URL placeholders for taxonomies.
   It’s a spot meant for the post types themselves.
 * For example, making the urls for your post types above be examples like: “/events-
   type/” and “/manifestations/” while still retaining the “myd” part for other 
   things.
 * Possible that you could achieve what you’re needing/wanting with one of these,
   and worth at least exploring/tinkering:
 * [https://wordpress.org/plugins/permalinks-customizer/](https://wordpress.org/plugins/permalinks-customizer/)
 * [https://wordpress.org/plugins/custom-post-type-permalinks/](https://wordpress.org/plugins/custom-post-type-permalinks/)

Viewing 1 replies (of 1 total)

The topic ‘Permalink’ is closed to new replies.

 * ![](https://ps.w.org/custom-post-type-ui/assets/icon-256x256.png?rev=2744389)
 * [Custom Post Type UI](https://wordpress.org/plugins/custom-post-type-ui/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-post-type-ui/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-post-type-ui/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-post-type-ui/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-post-type-ui/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-post-type-ui/reviews/)

## Tags

 * [permalink](https://wordpress.org/support/topic-tag/permalink/)

 * 1 reply
 * 2 participants
 * Last reply from: [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/permalink-102/#post-12635091)
 * Status: resolved