How To Lessions Post Type
Custom Post Type for “How To” articles
if ( ! function_exists('headshop_how_to') ) { // Register Custom Post Type function headshop_how_to() { $labels = array( 'name' => _x( 'How Tos', 'Post Type General Name', 'headshophero' ), 'singular_name' => _x( 'How To', 'Post Type Singular Name', 'headshophero' ), 'menu_name' => __( 'How Tos', 'headshophero' ), 'name_admin_bar' => __( 'How Tos', 'headshophero' ), 'parent_item_colon' => __( 'Parent How To:', 'headshophero' ), 'all_items' => __( 'All How Tos', 'headshophero' ), 'add_new_item' => __( 'Add New How To', 'headshophero' ), 'add_new' => __( 'Add How To', 'headshophero' ), 'new_item' => __( 'New How To', 'headshophero' ), 'edit_item' => __( 'Edit How To', 'headshophero' ), 'update_item' => __( 'Update How to', 'headshophero' ), 'view_item' => __( 'View How To', 'headshophero' ), 'search_items' => __( 'Search How Tos', 'headshophero' ), 'not_found' => __( 'How To Article Not found', 'headshophero' ), 'not_found_in_trash' => __( 'Not found in Trash', 'headshophero' ), ); $args = array( 'label' => __( 'how-to-article', 'headshophero' ), 'description' => __( 'Head Shop Hero How-To Articles', 'headshophero' ), 'labels' => $labels, 'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'trackbacks', 'revisions', 'custom-fields', 'page-attributes', 'post-formats', ), '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' => 'page', ); register_post_type( 'how-to-article', $args ); } // Hook into the 'init' action add_action( 'init', 'headshop_how_to', 0 ); }