Output taxonomy as comma separated value (auto output, php, widget, shortcode) for WP Job Manager Field Editor

functions.php<?php // // CUSTOM FILTER TO ADD COMMA AFTER TAXONOMY OUTPUT FOR FIELD EDITOR // // add_filter( ‘field_editor_output_no_wrap_after’, ‘mysite_check_if_need_to_output_csv’, 10, 6 ); function mysite_check_if_need_to_output_csv( $separator, $field_slug, $job_id, $field_values, $args, $single_value ){ // ADD ANY ADDITIONAL META KEYS TO USE WITH COMMAS BELOW $csv_meta_keys = array( ‘job_skill’, ‘qualification_tag’ ); // If meta key is not one […]

How to output File Upload Field Type as link with filename as label/caption through custom ShortCode

functions.php<?php add_shortcode(‘listing_custom_file_output’, ‘listing_custom_file_output_filename_link’); function listing_custom_file_output_filename_link( $atts, $content = ”){ // !! WARNING !! // When using the core WordPress `get_post_meta` you MUST prepend the meta key // with an underscore. So if the meta key was listing_custom_file, below it // needs to be _listing_custom_file $file_paths = get_post_meta( get_the_ID(), "_listing_custom_file") if( empty( $file_paths ) ) return; […]

Multiselect field editor template with Chosen support

multiselect-field.php<?php wp_enqueue_script( ‘wp-job-manager-multiselect’ ); ?> <select multiple="multiple" name="<?php echo esc_attr( isset($field[‘name’]) ? $field[‘name’] : $key ); ?>[]" id="<?php echo esc_attr( $key ); ?>" class="job-manager-multiselect" <?php if( ! empty($field[‘required’]) ) echo ‘required’; ?> data-no_results_text="<?php _e( ‘No results match’ ); ?>" data-multiple_text="<?php _e( ‘Select Some Options’ ); ?>"> <?php $no_values = isset( $field[‘value’] ) ? false : […]

How to set max selections for different term-multiselect fields (required template override)

term-multiselect-field.php<?php // You need to use this file as a template override for this to work, // for more details please see the wpjobmanager.com documentation: // https://wpjobmanager.com/document/template-overrides/ // Get selected value if ( isset( $field[‘value’] ) ) { $selected = $field[‘value’]; } elseif ( ! empty( $field[‘default’] ) && is_int( $field[‘default’] ) ) { $selected […]

How to turn a WP Job Manager Field Editor standard text field into a currency field with jQuery Mask Money ( https://github.com/plentz/jquery-maskmoney )

functions.php<?php // ^ the <?php above should only be in your functions.php file ONCE, at the top … do not include <?php if you’re adding this to the end of your functions.php file // Register our jQuery MaskMoney script in WordPress (does not output, only register) add_action( ‘wp_enqueue_scripts’, ‘my_custom_register_currency_script’ ); // Call our function to […]

How to execute shortcode when used in a field

content-single-job_listing.php<?php // You should only use this code below if the field is an "admin only" field. // Using a field that is not admin only will allow any user to execute shortcodes from your site, and can cause security issues $list_related_products = get_custom_field( ‘list_related_products’ ); echo do_shortcode( $list_related_products );