我对自定义帖子类型有一个问题,我创建了一个名为“Agenda”的自定义帖子类型,并为http://example.com/agenda 它工作正常,它指向归档议程。php模板,但用于http://example.com/agenda/page/2 显示404错误,你有什么建议?我用来添加自定义帖子类型的代码是:
<?php
function create_event_type() {
$event_args = array(
\'label\' => __(\'Agenda\'),
\'singular_label\' => __(\'Evento\'),
\'public\' => true,
\'show_ui\' => true,
\'capability_type\' => \'post\',
\'hierarchical\' => false,
\'rewrite\' => true,
\'has_archive\' => true,
\'publicly_queryable\' => true,
\'show_in_nav_menus\' => true,
\'query_var\' => true,
\'supports\' => array(
\'revisions\', // (will store revisions)
//\'page-attributes\', // (menu order, hierarchical must be true to show Parent option)
\'title\',
\'editor\')
);
register_post_type(\'agenda\', $event_args);
}
add_action(\'init\', \'create_event_type\');
?>
提前感谢!