MATCOM: FAQ
// Register Custom Post Type
function tmg_post_type_faq() {
$labels = array(
'name' => _x( 'FAQs', 'Post Type General Name', 'tmg' ),
'singular_name' => _x( 'FAQ', 'Post Type Singular Name', 'tmg' ),
'menu_name' => __( 'FAQs', 'tmg' ),
'parent_item_colon' => __( 'Parent FAQ:', 'tmg' ),
'all_items' => __( 'All FAQs', 'tmg' ),
'view_item' => __( 'View FAQ', 'tmg' ),
'add_new_item' => __( 'Add New FAQ', 'tmg' ),
'add_new' => __( 'Add New', 'tmg' ),
'edit_item' => __( 'Edit FAQ', 'tmg' ),
'update_item' => __( 'Update FAQ', 'tmg' ),
'search_items' => __( 'Search FAQ', 'tmg' ),
'not_found' => __( 'Not found', 'tmg' ),
'not_found_in_trash' => __( 'Not found in Trash', 'tmg' ),
);
$args = array(
'label' => __( 'tmg_faq', 'tmg' ),
'description' => __( 'FAQ', 'tmg' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => false,
'show_in_admin_bar' => false,
'menu_position' => 5,
'menu_icon' => 'dashicons-welcome-learn-more',
'can_export' => true,
'has_archive' => false,
'exclude_from_search' => false,
'publicly_queryable' => false,
'capability_type' => 'page',
);
register_post_type( 'tmg_faq', $args );
}
// Hook into the 'init' action
add_action( 'init', 'tmg_post_type_faq', 0 );