Template Functions Reference
Job Post Loop
Section titled “Job Post Loop”have_jobposts()
Section titled “have_jobposts()”Check if job posts exist and advance the loop iterator.
have_jobposts( $count, $offset );| Parameter | Type | Required | Description |
|---|---|---|---|
$count | int | No | Maximum number of jobs to loop through |
$offset | int | No | Number of jobs to skip |
Returns bool.
the_jobpost()
Section titled “the_jobpost()”Advance the loop iterator and/or echo a field value.
the_jobpost( $field, $job_post_id );| Parameter | Type | Required | Description |
|---|---|---|---|
$field | string | No | Field name to echo |
$job_post_id | int | No | Specific job post ID |
get_jobpost()
Section titled “get_jobpost()”Return a field value without echoing.
get_jobpost( $field, $job_post_id );| Parameter | Type | Required | Description |
|---|---|---|---|
$field | string | Yes | Field name to retrieve |
$job_post_id | int | No | Specific job post ID. Defaults to current post. |
Returns the field value or false if not found.
have_expired_jobposts()
Section titled “have_expired_jobposts()”Same as have_jobposts() but iterates expired jobs.
have_expired_jobposts( $count );| Parameter | Type | Required | Description |
|---|---|---|---|
$count | int | No | Maximum number of expired jobs |
Returns bool.
reset_jobpost_loop()
Section titled “reset_jobpost_loop()”Reset the loop iterator. Required when using multiple loops on the same page.
reset_jobpost_loop();Counting
Section titled “Counting”get_jobpost_count()
Section titled “get_jobpost_count()”Get the count of job posts.
get_jobpost_count( $filtered );| Parameter | Type | Required | Description |
|---|---|---|---|
$filtered | bool | No | true (default) returns count based on active filters. false returns total count. |
Returns int.
get_jobpost_position_count()
Section titled “get_jobpost_position_count()”Get the total number of open positions (sum of all numberOfPositions values).
get_jobpost_position_count( $filtered );| Parameter | Type | Required | Description |
|---|---|---|---|
$filtered | bool | No | true (default) returns filtered count. false returns total. |
Returns int.
Nested Objects (Contacts, etc.)
Section titled “Nested Objects (Contacts, etc.)”have_jobpost_object()
Section titled “have_jobpost_object()”Check if nested data exists and advance the nested iterator.
have_jobpost_object( $name );| Parameter | Type | Required | Description |
|---|---|---|---|
$name | string | Yes | The nested data name (e.g., 'contacts') |
Returns bool.
the_jobpost_object()
Section titled “the_jobpost_object()”Advance the nested iterator and/or echo a field value.
the_jobpost_object( $field );| Parameter | Type | Required | Description |
|---|---|---|---|
$field | string | No | Field name to echo |
get_jobpost_object()
Section titled “get_jobpost_object()”Return a nested field value without echoing.
get_jobpost_object( $field );| Parameter | Type | Required | Description |
|---|---|---|---|
$field | string | Yes | Field name to retrieve |
Returns the value or false.
Filtering
Section titled “Filtering”get_jobpost_filters()
Section titled “get_jobpost_filters()”Get all distinct values for a field across all job posts.
get_jobpost_filters( $field, $reduce_by_filter );| Parameter | Type | Required | Description |
|---|---|---|---|
$field | string | Yes | Field name |
$reduce_by_filter | bool | No | If true, reduce results based on active filters. Default: false. |
Returns array of distinct values.
get_jobpost_filter_url()
Section titled “get_jobpost_filter_url()”Generate a URL that toggles a filter value on or off.
get_jobpost_filter_url( $field, $value );| Parameter | Type | Required | Description |
|---|---|---|---|
$field | string | Yes | Field name |
$value | string | Yes | Value to toggle |
Returns string URL.
get_jobpost_filter_count()
Section titled “get_jobpost_filter_count()”Count how many jobs match a specific filter value.
get_jobpost_filter_count( $field, $value );| Parameter | Type | Required | Description |
|---|---|---|---|
$field | string | Yes | Field name |
$value | string | Yes | Value to count |
Returns int.
has_jobpost_filter()
Section titled “has_jobpost_filter()”Check if a filter is currently active.
has_jobpost_filter( $field, $value );| Parameter | Type | Required | Description |
|---|---|---|---|
$field | string | Yes | Field name |
$value | string | No | If set, checks for this specific value |
Returns bool.
Utility
Section titled “Utility”single_job_post_loaded()
Section titled “single_job_post_loaded()”Check if a single job post page is currently loaded.
single_job_post_loaded();Returns bool.
job_post_map()
Section titled “job_post_map()”Get Google Maps embed HTML for the current job’s location.
job_post_map( $width, $height );| Parameter | Type | Required | Description |
|---|---|---|---|
$width | int | No | Map width in pixels |
$height | int | No | Map height in pixels |
Returns string (HTML).