Skip to content

Instantly share code, notes, and snippets.

@tripflex
Last active September 30, 2015 15:45
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/fa492a486ec5b5b0a6c1 to your computer and use it in GitHub Desktop.
Save tripflex/fa492a486ec5b5b0a6c1 to your computer and use it in GitHub Desktop.
Example action hook field type to output shortcode
<?php
// There should only be one <?php at the top of your file, do not add this if it already exists
function custom_N01_Price_action( $field, $key ) {
echo do_shortcode('[table id=1]');
}
// Here the meta key is N01_Price, so the action would be job_manager_field_actionhook_N01_Price
add_action( 'job_manager_field_actionhook_N01_Price', 'custom_N01_Price_action', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment