Last active
November 30, 2018 14:21
-
-
Save tripflex/f9a2d7057d2e1d0d147749639148fa2a to your computer and use it in GitHub Desktop.
Prepend and/or Append custom string when outputting a field using WP Job Manager Field Editor
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 | |
// Make sure to change YOUR_META_KEY to match the meta key you want to prepend/append to | |
add_filter( 'field_editor_output_as_args_YOUR_META_KEY', 'smyles_add_custom_prepend_append' ); | |
function smyles_add_custom_prepend_append( $args ){ | |
// Shown before value: | |
$args['prepend'] = 'Before Value: '; | |
// Shown after value: | |
$args['append'] = 'After Value'; | |
return $args; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment