Displaying fields
Last updated
Last updated
To get or display a job post field inside the loop or in the individual job post page template, we have two simple functions: get_jobpost()
and the_jobpost()
.
Returns the value of a specific . Returns false
if value is not found.
Intuitive and powerful, this function can be used to load the value of any field from any location.
$field
(string) (Required) The field name.
$job_post_id
(Optional) The job post ID. Defaults to the current post.
This example shows how to load the value of field ‘title’ from the current job post.
This example shows how to load the value of field ‘title’ from the job post with ID = 24592.
This example shows how to check if a value exists for a field.
Displays the value of a specific field.
Intuitive and powerful, this function can be used to output the value of any field from any location. Please note that this function is the same as echo get_jobpost()
.
$field
(string) (Required) The field name.
$job_post_id
(Optional) The job post ID. Defaults to the current post.
This example shows how to display the value of field ‘title’ from the current job post.
This example shows how to display the value of field ‘title’ from the job post with ID = 123.
This example shows how to check if a value exists for a field.
But it is probably better to do something like this: