Set a custom placeholder for WP Job Manager taxonomy dropdown field

functions.php

<?php

add_filter( 'job_manager_term_select_field_wp_dropdown_categories_args', 'smyles_set_tax_dropdown_placeholder' );

function smyles_set_tax_dropdown_placeholder( $args ){
	
	$taxonomy = $args['taxonomy'];
	
	switch ($taxonomy){
		// Set your custom taxonomy here
		case 'mycustomtaxonomy':
			// Set your custom taxonomy placeholder here
			$args['show_option_none'] = __( 'Custom taxonomy placeholder 1' );
			$args['option_none_value'] = '';
			break;
		case 'mycustomtaxonomy2':
			$args['show_option_none'] = __( 'Custom taxonomy placeholder 2' );
			$args['option_none_value'] = '';
			break;
	}
	
	return $args;
}
No comments yet.

Leave a Reply