Home › Forums › WordPress › Custom Posts › Create a Custom Post Type
- This topic has 0 replies, 1 voice, and was last updated 8 years, 2 months ago by Layer7web.
Viewing 0 reply threads
-
AuthorPosts
-
-
September 12, 2016 at 4:33 pm #2478
Layer7webKeymasterPHP1234567891011121314151617181920212223/*** 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 );}- This topic was modified 8 years, 2 months ago by Layer7web.
-
-
AuthorPosts
Viewing 0 reply threads
You must be logged in to reply to this topic.
Comments are closed.