註冊自定義帖子型別
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
的新自定義帖子型別