首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >标题不显示在新帖子类型中

标题不显示在新帖子类型中
EN

Stack Overflow用户
提问于 2019-04-06 21:11:28
回答 1查看 28关注 0票数 1

我注册了一个新的帖子类型。但在管理菜单中,当我想添加一个新的帖子,标题栏不显示。

代码是:

代码语言:javascript
复制
  $label = array(
     'name' => __( 'نمونه کار ها' ),
     'singular_name' => __( 'نمونه کار' ),
   );
   $arg = array(
     'labels' => $label,
     'public' => true,
     'has_archive' => true,
     'menu_position' => 10,
     'supports' =>array(
       'author',
       'editor',
       'page-attributes',
       'revisions' ,
       'comments',
       'custom-fields',
       'trackbacks',
       'excerpt',
       'thumbnail',
     ),
     'taxonomies' => array('portfolio_cat','portfolio_tag'),
   );
   register_post_type("haportfolio",$arg);
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-04-06 21:55:05

您需要在supports中添加title

代码语言:javascript
复制
$arg = array(
     'labels' => $label,
     'public' => true,
     'has_archive' => true,
     'menu_position' => 10,
     'supports' =>array(
       'title',
       'author',
       'editor',
       'page-attributes',
       'revisions' ,
       'comments',
       'custom-fields',
       'trackbacks',
       'excerpt',
       'thumbnail',
     ),
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55549385

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档