注册自定义帖子类型
add_action( 'init', function() {
register_post_type( 'event', array(
'public' => true,
'label' => 'Events'
);
);
});
注册一个带有标签 Events
和 slug event
的新自定义帖子类型
add_action( 'init', function() {
register_post_type( 'event', array(
'public' => true,
'label' => 'Events'
);
);
});
注册一个带有标签 Events
和 slug event
的新自定义帖子类型