当前获取我的帖子类型数据的查询时间太长,几乎需要一分钟才能呈现4.6万条记录。是否有筛选器或操作来自定义此帖子类型的SQL函数以及在管理面板中生成的标记?
我正在使用的插件:高级自定义字段、WordPress SEO
function add_custom_groupon() {
$labels = array(
\'name\' => \'Groupon Codes\',
\'singular_name\' => \'Groupon Code\',
\'add_new\' => \'Add New Code\',
\'add_new_item\' => \'Add New Code\',
\'edit_item\' => \'Edit Code\',
\'new_item\' => \'New Code\',
\'all_items\' => \'All Codes\',
\'view_item\' => \'View Code\',
\'search_items\' => \'Search Codes\',
\'not_found\' => \'No codes found\',
\'not_found_in_trash\' => \'No codes found in trash\',
\'parent_item_colon\' => \'\',
\'menu_name\' => \'Groupon\'
);
$args = array(
\'labels\' => $labels,
\'public\' => false,
\'publicly_queryable\' => false,
\'show_ui\' => true,
\'show_in_menu\' => true,
\'query_var\' => true,
\'rewrite\' => array( \'slug\' => \'groupon\' ),
\'capability_type\' => \'post\',
\'has_archive\' => true,
\'hierarchical\' => true,
\'menu_position\' => null,
\'supports\' => array( \'title\' )
);
register_post_type( \'groupon\', $args );
}
add_action( \'init\', \'add_custom_groupon\' );