Created
July 31, 2013 14:12
-
-
Save scottwyden/6122318 to your computer and use it in GitHub Desktop.
This file contains 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
add_action( 'init', 'register_cpt_recommends' ); | |
function register_cpt_recommends() { | |
$labels = array( | |
'name' => _x( 'Recommends', 'recommends' ), | |
'singular_name' => _x( 'Recommends', 'recommends' ), | |
'add_new' => _x( 'Add New', 'recommends' ), | |
'add_new_item' => _x( 'Add New Recommends', 'recommends' ), | |
'edit_item' => _x( 'Edit Recommends', 'recommends' ), | |
'new_item' => _x( 'New Recommends', 'recommends' ), | |
'view_item' => _x( 'View Recommends', 'recommends' ), | |
'search_items' => _x( 'Search Recommends', 'recommends' ), | |
'not_found' => _x( 'No recommends found', 'recommends' ), | |
'not_found_in_trash' => _x( 'No recommends found in Trash', 'recommends' ), | |
'parent_item_colon' => _x( 'Parent Recommends:', 'recommends' ), | |
'menu_name' => _x( 'Recommends', 'recommends' ), | |
); | |
$args = array( | |
'labels' => $labels, | |
'hierarchical' => true, | |
'supports' => array( 'title'), | |
'public' => true, | |
'show_ui' => true, | |
'show_in_menu' => true, | |
'menu_position' => 7, | |
'menu_icon' => '/images/recommends-icon.png', /* Use your own 16px image */ | |
'show_in_nav_menus' => true, | |
'publicly_queryable' => true, | |
'exclude_from_search' => true, | |
'has_archive' => false, | |
'query_var' => true, | |
'can_export' => true, | |
'rewrite' => true, | |
'capability_type' => 'page' | |
); | |
register_post_type( 'recommends', $args ); | |
flush_rewrite_rules(); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment