WordPress-自定义帖子类型-并非所有属性都已设置

时间:2020-04-11 19:06:53

标签: wordpress

我正在尝试在Wordpress Developer v5.4中构建自定义帖子类型 自定义帖子类型显示在我的仪表板上,并且我已经能够创建/自定义与该自定义帖子类型相关的某些属性,但并非所有这些属性似乎都已实现。

功能

{
    register_post_type('testimonials', array(
        'public' => true,
        'has_archive' => true,
        'supports' => array('title', 'editor', 'excerpt', 'custom-fields'),
        'menu_icon' => 'dashicons-format-quote',
        'labels' => array(
            'name' => 'Testimonials',
            'add_new_item' => 'Add New Testimonial',
            'new_item' => 'Add New Testimonial',
            'edit_item' => 'Edit Testimonial',
            'all_items' => 'All Testimonials',
            'singular_name' => 'Testimonial'
        )
    ));
}

add_action('init', 'wrfguides_post_types');

对于支持-摘录和自定义字段未显示。 对于标签,仅实现名称。

0 个答案:

没有答案
相关问题