【问题标题】:How to add tags in Wordpress Custom Post?如何在 Wordpress 自定义帖子中添加标签?
【发布时间】:2014-04-23 11:55:56
【问题描述】:

我创建了一个自定义帖子,但没有可用的标签,这与 WORDPRESS 中具有标签的默认帖子不同。如何在我创建的自定义帖子中复制或实施它?

请给我一些建议。

我的自定义帖子,没有可用的标签

【问题讨论】:

标签: wordpress custom-post-type


【解决方案1】:

在您的自定义帖子类型中添加此部分

$args = array('labels' => $labels,'public' => true,'publicly_queryable' => true,'show_ui' => true,'query_var' => true,'rewrite' => true ,'capability_type' => 'post','hierarchical' => false,'menu_position' => null,'taxonomies' => array('tag') );

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-04-10
    • 2014-06-02
    • 1970-01-01
    • 1970-01-01
    • 2018-02-23
    • 2017-01-12
    相关资源
    最近更新 更多