Created
May 11, 2017 14:33
-
-
Save tripflex/cf5e51a0e9342535038926afce9498b5 to your computer and use it in GitHub Desktop.
WP Job Manager Field Editor multiple value output as comma separated value instead of on new lines (</br>)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// DO NOT include the above <?php, there should ONLY be one at the top of your child theme's functions.php file | |
add_filter( 'field_editor_output_no_wrap_after', 'smyles_output_multiple_values_with_commas', 10, 6 ); | |
function smyles_output_multiple_values_with_commas( $separator, $field_slug, $listing_id, $field_value, $args, $single_value ){ | |
if( $field_slug !== 'your_meta_key' ){ | |
return $separator; | |
} | |
return ', '; | |
} |
Author
tripflex
commented
Mar 13, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment