嗨,我正在尝试创建一个自定义帖子类型的显示页面,但由于某些原因,该页面无法工作,我被发送到404。php。这是我的代码:
add\\u action(\'init\',\'business\\u manager\\u register\');
function business_manager_register(){
//add custom post type
$args = array(
\'label\' => \'Business Managers\',
\'singular_label\' => \'Business\',
\'public\' => true,
\'shouw_ui\' => true,
\'capability_type\' => \'post\',
\'hierarchical\' => true,
\'has_archive\' => true,
\'supports\' => array(\'title\',\'editor\',\'thumbnail\'),
\'rewrite\' => array(\'slug\' => \'businesses\' , \'with_front\' => false)
);
register_post_type(\'businesses\' , $args);
}
现在为了显示它,我创建了文件归档业务。php。根据我添加的slug,链接应该是这样的:
链接/业务但是当我尝试链接到它时,我得到404错误,对于单个业务也会发生同样的事情。php。我做错了什么?