Custom post type & custom taxonomy URI
-
$career_story = array( 'labels' => $career_story_label, 'description' => __('career story', 'rsupport'), 'public' => true, 'menu_position' => 31, 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments', 'page-attributes','revisions'), // 'has_archive' => true, // only this is required to enable archive page else 404 error will occur 'publicly_queryable' => true, 'show_ui' => true, 'query_var' => true, 'hierarchical' => false, 'rewrite' => array( 'slug' => 'career/story'), 'menu_icon' => 'dashicons-format-aside', ); $args = array( 'labels' => $taxonomy_labels, 'hierarchical' => true, 'public' => true, 'show_ui' => true, 'show_admin_column' => true, 'show_in_nav_menus' => true, 'show_tagcloud' => true, ); register_taxonomy( 'story', 'story', $args );
register_post_type( ‘storys’, $career_story );
register_taxonomy( ‘story’, ‘storys’, $args_career_story );
register_taxonomy_for_object_type( ‘story’, ‘storys’ );
hello. I’m struggling with custom-post configuration. If you create a post after setting custom-post as above,
The url is properly created, such as https://abi.rsupport.com/ko-kr/career/story/{title}. However, when a category is created and selected, the url of the created category is
Returned to https://abi.rsupport.com/en-us/story/{category-slug}.I want to make it in the format https://abi.rsupport.com/en-us/career/story/{category-slug}/title. Is there something I have not set up correctly??
Please help me
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Custom post type & custom taxonomy URI’ is closed to new replies.