Skip to content

Instantly share code, notes, and snippets.

@jeremyescott
Last active January 26, 2018 20:54
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 jeremyescott/07495ce53ed0ee412f8ac4e205e3970e to your computer and use it in GitHub Desktop.
Save jeremyescott/07495ce53ed0ee412f8ac4e205e3970e to your computer and use it in GitHub Desktop.
3 ways to display job fields in Matador
<?php
// Shortcode in the WordPress Editor or a Page Builder
// name: the name of the field
// id: (optional) the ID of the job, if you're outside the loop
// before: (optional) arbitrary HTML before the field.
// after: (optional) arbitrary HTML after the field.
[matador_job_field name="employmentType" id="XX" before="some-html" after="some-html"]
// Matador Field Template Helper
// Gets the Field with markup.
// Args array (optional) with fields including
// id: (optional) the ID of the job, if you're outside the loop
// before: (optional) arbitrary HTML before the field.
// after: (optional) arbitrary HTML after the field.
matador_the_job_field( (string) $field, (int) $id [optional], (array) $args [optional] );
// The Meta Field
// Gets only the value with no added markup.
matador_the_job_meta( (string) $field, (int) $id [optional] );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment