1

I have registered a custom post type oa_location with custom menu (using show_in_menu) and a taxonomy called oa_country. These two connected but because our CPT placed in a custom menu, there is a problem in url of taxonomy term:

http://localhost/demo/wp-admin/term.php?taxonomy=oa_country&tag_ID=46&post_type=post&wp_http_referer=demo/wp-admin/edit-tags.php?taxonomy=oa_country

my code to register this CPT:

$arg = array(
  'label'        => __('Post Type', 'text_domain'),
  'description'  => __('Post Type Description', 'text_domain'),
  'labels'       => $labels,
  'show_in_menu' => 'our-agencies',
  'taxonomies'   => array('oa_country'),
);

register_post_type('oa_location');

the problem is about show_in_menu. what can i do?

1
  • To work show_in_menu, show_ui must be true. try adding show_ui parameter in argument. after that flushed rewrite rules and permalinks. Dec 4, 2019 at 4:54

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.