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