Skip to content

Instantly share code, notes, and snippets.

@tripflex
Last active November 30, 2018 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tripflex/f9a2d7057d2e1d0d147749639148fa2a to your computer and use it in GitHub Desktop.
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
<?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