Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Register Technology Taxonomy

For developers who building their portfolio and know they will be attaching a “technology” taxonomy to their “project” post type.

// Register Custom Taxonomy
function register_technology_taxonomy() {

	$labels = array(
		'name'                       => _x( 'Technologies', 'Taxonomy General Name', 'daveyjake' ),
		'singular_name'              => _x( 'Technology', 'Taxonomy Singular Name', 'daveyjake' ),
		'menu_name'                  => __( 'Technology', 'daveyjake' ),
		'all_items'                  => __( 'All Technologies', 'daveyjake' ),
		'parent_item'                => __( 'Parent Technology', 'daveyjake' ),
		'parent_item_colon'          => __( 'Parent Technology:', 'daveyjake' ),
		'new_item_name'              => __( 'New Technology Name', 'daveyjake' ),
		'add_new_item'               => __( 'Add New Technology', 'daveyjake' ),
		'edit_item'                  => __( 'Edit Technology', 'daveyjake' ),
		'update_item'                => __( 'Update Technology', 'daveyjake' ),
		'view_item'                  => __( 'View Technology', 'daveyjake' ),
		'separate_items_with_commas' => __( 'Separate technologies with commas', 'daveyjake' ),
		'add_or_remove_items'        => __( 'Add or remove technologies', 'daveyjake' ),
		'choose_from_most_used'      => __( 'Choose from the most used technologies', 'daveyjake' ),
		'popular_items'              => __( 'Popular Technologies', 'daveyjake' ),
		'search_items'               => __( 'Search Technologies', 'daveyjake' ),
		'not_found'                  => __( 'Technologies Not Found', 'daveyjake' ),
		'no_terms'                   => __( 'No technologies', 'daveyjake' ),
		'items_list'                 => __( 'Technologies list', 'daveyjake' ),
		'items_list_navigation'      => __( 'Technologies list navigation', 'daveyjake' ),
	);
	$rewrite = array(
		'slug'                       => 'technology',
		'with_front'                 => true,
		'hierarchical'               => false,
	);
	$args = array(
		'labels'                     => $labels,
		'hierarchical'               => false,
		'public'                     => false,
		'show_ui'                    => true,
		'show_admin_column'          => false,
		'show_in_nav_menus'          => false,
		'show_tagcloud'              => true,
		'query_var'                  => 'technology',
		'rewrite'                    => $rewrite,
		'show_in_rest'               => true,
		'rest_base'                  => 'technology',
	);
	register_taxonomy( 'technology', array( 'project' ), $args );

}
add_action( 'init', 'register_technology_taxonomy', 0 );