Permalink
-
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.
- The topic ‘Permalink’ is closed to new replies.