Created
May 12, 2015 01:40
-
-
Save webkupas/f712a2a4896043fc9dca to your computer and use it in GitHub Desktop.
WP Add Custom Post Type
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| </php | |
| /* register hyshel post type*/ | |
| function my_post_type_hyshell() { | |
| register_post_type( 'hyshell', | |
| array( | |
| 'labels' => array( | |
| 'name' => 'hyShells', | |
| 'singular_name' => 'hyShell', | |
| 'add_new' => 'Add New', | |
| 'add_new_item' => 'Add New hyShell', | |
| 'edit' => 'Edit', | |
| 'edit_item' => 'Edit hyShell', | |
| 'new_item' => 'New hyShell', | |
| 'view' => 'View', | |
| 'view_item' => 'View hyShell', | |
| 'search_items' => 'Search hyShells', | |
| 'not_found' => 'No hyShells found', | |
| 'not_found_in_trash' => 'No hyShells found in Trash', | |
| 'parent' => 'Parent hyShell' | |
| ), | |
| 'public' => true, | |
| 'show_ui' => true, | |
| 'show_in_nav_menus' => false, | |
| 'menu_position' => 5, | |
| 'menu_icon' => 'dashicons-cart', | |
| 'rewrite' => array( | |
| 'slug' => 'recipes-view', | |
| 'with_front' => FALSE, | |
| ), | |
| 'supports' => array( | |
| 'title', | |
| 'thumbnail', | |
| 'editor' | |
| ) | |
| ) | |
| ); | |
| } | |
| add_action('init', 'my_post_type_hyshell'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment