Shortcodes

Shortcodes

Right now you can use either job_field, resume_field, custom_field, or company_field and it will output same data. Separate shortcodes are for future enhancements.

If you want the shortcode to ONLY output the value (without any HTML or other wrappers), set the output_as argument to value:

[custom_field key="my_meta_key" output_as="value"]

Below is a list of arguments supported for the shortcodes.  If the option/argument is only used by a specific output as type it will say (TYPE output as):

  • key  (required) – The meta key for the field you want to output.
  • field (required) – Same as key above, you must use either field or key to specify the meta key. Only one (key or field) is required.
  • job_id  (optional) – If you want to output the value from a field for a specific Job or Resume ID, use this argument, otherwise leave blank and it will use the ID from the current page you have the shortcode on.
  • output_as  (default is null and outputs as standard text) – One of the available output as options, current options are value, oembed, video, link, image, checklabel, checkcustom
  • output_classes  – Any extra classes you want added to the field output HTML
  • output_show_label – ( value should be 1 for true, or 0 for false) – Whether or not to show the label for the field.
  • label  – Set this to any custom value if you want to use a custom label (different from configuration for field)
  • multiple  – Set this to 1 or true if you are outputting a field that is either a taxonomy, or is multiple file uploads (not required for Field Editor >= 1.3.6)
  • taxonomy  – If you are trying to output a taxonomy you may need to set this argument with the taxonomy slug (ie job category is job_listing_category)
  • li  – Set this to true or 1 if you want to output a multiple item field in <li> tags instead of comma separated values
  • image_link  – Set this to true or 1 if you want to wrap an image in a link to the full URL of the image (only for image output_as type)
  • output_oembed_width  (oembed output as) – Set a specific width for oEmbed outputs
  • output_oembed_height  (oembed output as) – Set a specific height for oEmbed outputs
  • output_video_width  (video output as) – Set a specific width for HTML5 video output
  • output_video_height  (video output as) – Set a specific height for HTML5 video output
  • output_video_poster  (video output as) – Set a specific image to be placeholder on HTML5 video output (must be a full URL to image)
  • output_video_allowdl  (video output as) – Set this to 1 or true if you want to allow users to download the video if their browser does not support HTML5 video
  • output_caption  (link output as) – Caption used for link
  • output_check_true  (checkcustom output as) – Caption used if checkbox was checked
  • output_check_false  (checkcustom output as) – Caption used if checkbox was not checked
  • output_enable_fw  Whether or not to output HTML wrappers around full output
  • output_enable_vw  Whether or not to output HTML wrappers around each value
  • output_full_wrap  HTML entity to use for full wrapper output (should be value without carets, example would be div)
  • output_value_wrap HTML entity to use for value wrapper output (should be value without carets, example would be div)
  • output_label_wrap HTML entity to use for label wrapper output (should be value without carets, example would be div)
  • fw_classes Any classes to add to the full wrap HTML element (should be separated by spaces)
  • inherit_config set to TRUE or 1 if you want the shortcode output to inherit any configuration from the auto output settings.  You can override specific settings by just setting them in the shortcode arguments as well.

 

You can also check the  /wp-content/plugins/wp-job-manager-field-editor/includes/functions.php file around line 308 (function is called  the_custom_field_output_as ) and any arguments supported in that function can be passed through the shortcode.

You can also use PHP Functions to output the custom field values.

Job Field Shortcode

key is required job_id optional

Company Field Shortcode

key is required job_id optional

Resume Field Shortcode

key is required job_id optional

Custom Field Shortcode

Custom field shortcode can be used for any fields, but it is recommended to use the shortcode specific to the field you are outputting (if for job, use job_field shortcode) to support any new features and updates.  At this time though, all shortcodes do exactly the same thing and you can use any of them to output fields with the same results.

key is required job_id optional

Total 13 Votes

Tell us how can we improve this post?

+ = Verify Human or Spambot ?