最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

custom post types - Incorrect post_type in url of taxonomy term

programmeradmin1浏览0评论

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?

发布评论

评论列表(0)

  1. 暂无评论