ucandostuff
// Register Custom Post Type
function guide_post_type() {
$labels = array(
'name' => _x( 'Write a Guides', 'Post Type General Name', 'magaziner-child' ),
'singular_name' => _x( 'Write a Guide', 'Post Type Singular Name', 'magaziner-child' ),
'menu_name' => __( 'Write a Guide', 'magaziner-child' ),
'name_admin_bar' => __( 'Write a Guide', 'magaziner-child' ),
'parent_item_colon' => __( 'Parent Guide:', 'magaziner-child' ),
'all_items' => __( 'All Guides', 'magaziner-child' ),
'add_new_item' => __( 'Add New Guide', 'magaziner-child' ),
'add_new' => __( 'Add Guide', 'magaziner-child' ),
'new_item' => __( 'New Guide', 'magaziner-child' ),
'edit_item' => __( 'Edit Guide', 'magaziner-child' ),
'update_item' => __( 'Update Guide', 'magaziner-child' ),
'view_item' => __( 'View Guide', 'magaziner-child' ),
'search_items' => __( 'Search Guide', 'magaziner-child' ),
'not_found' => __( 'Not found', 'magaziner-child' ),
'not_found_in_trash' => __( 'Not found in Trash', 'magaziner-child' ),
);
$args = array(
'label' => __( 'guide', 'magaziner-child' ),
'description' => __( 'Write a step-by-step guide', 'magaziner-child' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail', ),
'taxonomies' => array( 'category', 'post_tag' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'post',
);
register_post_type( 'guide', $args );
}
// Hook into the 'init' action
add_action( 'init', 'guide_post_type', 0 );