wordpress - 将我的 jupiter 主题标题生成器小部件添加到我的自定义帖子类型
问题描述
我为名为“insight-report”的公司 WordPress 网站创建了一个自定义帖子类型,但由于某种原因,我无法让 Jupiter 主题样式选项出现在帖子类型中。据我所知,如果有帮助,Jupiter builder 似乎位于 /header-builder/class-mkb-main.php 中。
我只是不确定是否应该将其添加到自定义帖子类型支持数组:
'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields', 'page-attributes' ),
还是我应该以某种方式将其排入队列?
如果有帮助,这是我的帖子类型:
function custom_post_type() {
$labels = array(
'name' => _x( 'Insight Report', 'Post Type General Name', 'mk_framework' ),
'singular_name' => _x( 'insight-report', 'Post Type Singular Name', 'mk_framework' ),
'menu_name' => __( 'Insight Report', 'mk_framework' ),
'parent_item_colon' => __( 'Parent Insight Report', 'mk_framework' ),
'all_items' => __( 'All Insight Reports', 'mk_framework' ),
'view_item' => __( 'View Insight Report', 'mk_framework' ),
'add_new_item' => __( 'Add New Insight Report', 'mk_framework' ),
'add_new' => __( 'Add New', 'mk_framework' ),
'edit_item' => __( 'Edit Insight Report', 'mk_framework' ),
'update_item' => __( 'Update Insight Report', 'mk_framework' ),
'search_items' => __( 'Search Insight Report', 'mk_framework' ),
'not_found' => __( 'Not Found', 'mk_framework' ),
'not_found_in_trash' => __( 'Not found in Trash', 'mk_framework' ),
);
$args = array(
'label' => __( 'insight-report', 'mk_framework' ),
'description' => __( 'Newtrade reports for clients', 'mk_framework' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields', 'page-attributes' ),
'taxonomies' => array( 'reports' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => true,
'show_in_admin_bar' => true,
'menu_position' => 5,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'post',
'show_in_rest' => true,
'taxonomies' => array( 'category', 'post_tag' ),
);
register_post_type( 'insight-report', $args );
}
add_action( 'init', 'custom_post_type', 0 );
解决方案
推荐阅读
- php - Symfony 3 - 我在管理我的角色时遇到了一些困难
- powershell - 移除所有 Sitecore 节点的发布限制
- lightbox2 - 灯箱图像 X 关闭按钮 对齐图像右上角
- reporting-services - SSRS 报告行可见性在不应该显示详细记录时显示
- javascript - 验证 var 是否存在
- c# - 需要模式实现的建议以将“处理器”从 WebApp 注入 NuGet
- javascript - Python EEL:在脚本运行期间更改按钮标签
- git - 将存储库转移到创建它们的个人帐户后,将拉取请求重新附加到分支?
- android - 如何从特定日期开始倒计时?
- python-3.x - 替换数据框列中每个值的天数