我创建了自定义的\\u post\\u类型:
add_action(\'init\', \'event_register\');
function event_register() {
$labels = array(
\'name\' => _x(\'Pacotes\', \'post type general name\'),
\'singular_name\' => _x(\'pacote\', \'post type singular name\'),
\'add_new\' => _x(\'adicionar\', \'pacote\'),
\'add_new_item\' => __(\'Adicionar novo Pacote\'),
\'edit_item\' => __(\'Editar Pacote\'),
\'new_item\' => __(\'Novo Pacote\'),
\'view_item\' => __(\'Ver Pacote\'),
\'search_items\' => __(\'Procurar Pacote\'),
\'not_found\' => __(\'Não encontrado\'),
\'not_found_in_trash\' => __(\'Nada encontrado no lixo\'),
\'parent_item_colon\' => \'\'
);
$args = array(
\'labels\' => $labels,
\'public\' => true,
\'publicly_queryable\' => true,
\'show_ui\' => true,
\'query_var\' => true,
\'rewrite\' => true,
\'capability_type\' => \'post\',
\'hierarchical\' => false,
\'menu_position\' => 5,
\'supports\' => array(\'title\',\'editor\',\'thumbnail\')
);
register_post_type( \'pacotes\' , $args );
}
当我创建帖子时,它不会出现在页面中。是否有任何要求发布的代码?
非常感谢。