Home › Forums › WordPress › Custom Posts › Create a Custom Post Type
/** * Custom Post Type Example */ add_action( 'init', 'l7w_register_custom_posts_example_init' ); function l7w_register_custom_posts_example_init() { // Register Example $board_labels = array( 'name' => 'Example Name', 'singular_name' => 'Example', 'menu_name' => 'Example', 'add_new_item' => 'Add Example', 'edit_item' => 'Edit Example' ); $board_args = array( 'labels' => $board_labels, 'public' => true, 'capability_type' => 'post', 'has_archive' => true, 'menu_icon' => 'dashicons-id-alt', 'supports' => array( 'title', 'editor', 'revisions' ) ); register_post_type( 'exmaple', $board_args ); }
You must be logged in to reply to this topic.