Yoast字段不显示在自定义帖子类型

问题描述:

我正在定制的网站上有几个自定义帖子类型。但是,Yoast似乎没有在自定义帖子概述页面上显示任何关键字和描述字段(不是各个帖子本身)。Yoast字段不显示在自定义帖子类型

我已经花了很多时间对谷歌搜索的解决方案,但补充道:

'public' => true 
'hierarchical' => true, 
'has_archive' => true, 

没有解决的问题。请参阅下面的完整代码段:

register_taxonomy_for_object_type('category', 'portfolio'); // Register   Taxonomies for Category 
register_taxonomy_for_object_type('post_tag', 'portfolio'); 
register_post_type('portfolio', // Register Custom Post Type 
    array(
    'labels' => array(
     'name' => __('Portfolio', 'html5blank'), // Rename these to suit 
     'singular_name' => __('Portfolio', 'html5blank'), 
     'add_new' => __('Add New', 'html5blank'), 
     'add_new_item' => __('Add New Item', 'html5blank'), 
     'edit' => __('Edit', 'html5blank'), 
     'edit_item' => __('Edit Item', 'html5blank'), 
     'new_item' => __('New Item', 'html5blank'), 
     'view' => __('View Item', 'html5blank'), 
     'view_item' => __('View Item', 'html5blank'), 
     'search_items' => __('Search Item', 'html5blank'), 
     'not_found' => __('No Item', 'html5blank'), 
     'not_found_in_trash' => __('No Item found in Trash', 'html5blank') 
    ), 
    'public' => true, 
    'menu_icon' => 'dashicons-images-alt2', 
    'hierarchical' => true, // Allows your posts to behave like Hierarchy Pages 
    'has_archive' => true, 
    'supports' => array(
     'title', 
    ), // Go to Dashboard Custom HTML5 Blank post for supports 
    'can_export' => true, // Allows export in Tools > Export 
    'taxonomies' => array(
     'post_tag', 
     'category' 
    ) // Add Category and Post Tags support 
)); 

有没有其他人经历过这个问题?提前感谢任何可以帮助我的人。

请使用屏幕选项下拉,并确保Yoast搜索引擎优化。

+0

我怎么错过这个?非常感谢Victor! – CharlyAnderson