Custom post type & custom taxonomy URI

[ad_1]

$career_story = array(

'labels' => $career_story_label,

'description' => __('career story', 'rsupport'),

'public' => true,

'menu_position' => 95,

'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',

// 'show_in_menu' => 'rsupport',

'taxonomies' => array('story'),

);
$args_career_story = array(

'labels' => $taxonomy_labels,

'hierarchical' => true,

'public' => true,

'show_ui' => true,

'show_admin_column' => true,

'show_in_nav_menus' => true,

'show_tagcloud' => true,

'query_var' =>true,

// 'has_archive' => true,

// 'rewrite' => array( 'slug' => 'career/story'),

);

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 {title}. However, when a category is created and selected, the url of the created category is
Returned to {category-slug}.

I want to make it in the format {category-slug}/title. Is there something I have not set up correctly??

Please help me

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer