Disable parent categories from being selected in taxonomy chosen dropdown for WP Job Manager Field Editor
script.js
jQuery( function($){
// To use for field other than job_region, change job_region to the meta
// key of the field
$( '#job_region > .level-0' ).each( function ( index ) {
$( this ).prop( 'disabled', 'disabled' );
});
$( '#job_region' ).trigger( 'chosen:updated' );
});
No comments yet.