Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Grupo Agito FAQ Snippet

// Register Custom Post Type
function register_faq_custom_post_type() {

	$labels = array(
		'name'                => _x( 'Frequently Asked Questions', 'Post Type General Name', 'grupoagito' ),
		'singular_name'       => _x( 'Frequently Asked Question', 'Post Type Singular Name', 'grupoagito' ),
		'menu_name'           => __( 'FAQ', 'grupoagito' ),
		'parent_item_colon'   => __( 'Parent Question:', 'grupoagito' ),
		'all_items'           => __( 'All Questions', 'grupoagito' ),
		'view_item'           => __( 'View Question', 'grupoagito' ),
		'add_new_item'        => __( 'Add New FAQ', 'grupoagito' ),
		'add_new'             => __( 'Add New', 'grupoagito' ),
		'edit_item'           => __( 'Edit FAQ', 'grupoagito' ),
		'update_item'         => __( 'Update FAQ', 'grupoagito' ),
		'search_items'        => __( 'Search FAQ', 'grupoagito' ),
		'not_found'           => __( 'FAQ fot found', 'grupoagito' ),
		'not_found_in_trash'  => __( 'FAQ not found in Trash', 'grupoagito' ),
	);
	$rewrite = array(
		'slug'                => 'faq',
		'with_front'          => true,
		'pages'               => false,
		'feeds'               => false,
	);
	$args = array(
		'label'               => __( 'faq', 'grupoagito' ),
		'description'         => __( 'Frequently Asked Question(s) for the site.', 'grupoagito' ),
		'labels'              => $labels,
		'supports'            => array( 'title', 'excerpt', 'comments', ),
		'hierarchical'        => false,
		'public'              => true,
		'show_ui'             => true,
		'show_in_menu'        => true,
		'show_in_nav_menus'   => false,
		'show_in_admin_bar'   => true,
		'menu_position'       => 10,
		'can_export'          => true,
		'has_archive'         => false,
		'exclude_from_search' => false,
		'publicly_queryable'  => true,
		'rewrite'             => $rewrite,
		'capability_type'     => 'page',
	);
	register_post_type( 'faq', $args );

}

// Hook into the 'init' action
add_action( 'init', 'register_faq_custom_post_type', 0 );