Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Custom Taxonomy Services

To add services to partner

if ( ! function_exists( 'partner_services_taxonomy' ) ) {

// Register Custom Taxonomy
function partner_services_taxonomy() {

	$labels = array(
		'name'                       => _x( 'Services', 'Taxonomy General Name', 'requiredsplus' ),
		'singular_name'              => _x( 'Service', 'Taxonomy Singular Name', 'requiredsplus' ),
		'menu_name'                  => __( 'Service', 'requiredsplus' ),
		'all_items'                  => __( 'All Services', 'requiredsplus' ),
		'parent_item'                => __( 'Parent Service', 'requiredsplus' ),
		'parent_item_colon'          => __( 'Parent Service:', 'requiredsplus' ),
		'new_item_name'              => __( 'New Service Name', 'requiredsplus' ),
		'add_new_item'               => __( 'Add New Service', 'requiredsplus' ),
		'edit_item'                  => __( 'Edit Service', 'requiredsplus' ),
		'update_item'                => __( 'Update Service', 'requiredsplus' ),
		'view_item'                  => __( 'View Item', 'requiredsplus' ),
		'separate_items_with_commas' => __( 'Separate services with commas', 'requiredsplus' ),
		'add_or_remove_items'        => __( 'Add or remove services', 'requiredsplus' ),
		'choose_from_most_used'      => __( 'Choose from the most used services', 'requiredsplus' ),
		'popular_items'              => __( 'Popular Items', 'requiredsplus' ),
		'search_items'               => __( 'Search Services', 'requiredsplus' ),
		'not_found'                  => __( 'Not Found', 'requiredsplus' ),
	);
	$args = array(
		'labels'                     => $labels,
		'hierarchical'               => true,
		'public'                     => true,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => true,
		'show_tagcloud'              => true,
	);
	register_taxonomy( 'services', array( 'partner' ), $args );

}

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

}