Easy Job Sync Documentation
Shortcodes
Job-Filter
The following shortcodes can be used for the job filters on the page where the job list is also embedded:
Filter by category:
[j2wp_CategoryFilter]
Parameters | Type | Standard | Description |
---|---|---|---|
default_text | string | All | What the option for all entries should be called |
Filter by custom metafield:
[j2wp_CustomMetaFilter]
Filter by type of employment:
[j2wp_EmploymentTypeFilter]
Parameters | Type | Standard | Description |
---|---|---|---|
default_text | string | All | What the option for all entries should be called |
Filter by place:
[j2wp_LocationFilter]
Filter by name
[j2wp_NameFilter]
Undo all filters
[j2wp_ResetLink]
Parameters | Type | Standard | Description |
---|---|---|---|
linktext | string | „reset filters“ | Text for the ResetLink in the frontend |
Filter Button
A freely positionable button to submit all filters embedded on the current page
[j2wp_SubmitButton]
Parameters | Type | Standard | Description |
---|---|---|---|
buttontext | string | „Search“ | Text for the submit button in the frontend |
Order filter
Sort the list of jobs
[j2wp_OrderFilter]
Parameters | Type | Standard | Description |
---|---|---|---|
orderby | string | title | The field to sort by. Options: – title – date |
order | string | ASC | The direction to sort in. Options: – ASC – DESC |
Custom Drop Down Filter
Create a custom dropdown field to sort the job list.
[j2wp_CustomDropDownFilter]
Parameters | Type | Standard | Description |
---|---|---|---|
key | string | – | The field to filter by. |
default_text | string | All | What the option for all entries should be called |
Job-List
Displays the list of jobs
[j2wp_joblist]
Parameters | Type | Standard | Description |
---|---|---|---|
posts_per_page | number | -1 | Number of jobs displayed -1 = all jobs |
scroll_to_jobs | bool | false | Whether to automatically scroll to the job list when loading jobs |
display_mode | string | list | “List” or “grid” view of the jobs |
Pre-filtered job list
Displays a pre-filtered and pre-rendered list of jobs
[j2wp_prefiltered_joblist]
Parameters | Type | Standard | Description |
---|---|---|---|
posts_per_page | number | -1 | Number of jobs displayed -1 = all jobs |
meta_key | string | null (type) | If only “meta_key” is provided, it filters whether the meta field exists. If “meta_value” is also specified, it is used as the key |
meta_value | string | null (type) | Jobs are filtered based on whether they have a meta field with the same value |
Output specific fields
Returns the value of the specified field
[j2wp_custom_field field="freitextfeld1" container="false"]
Parameters | Type | Standard | Description |
---|---|---|---|
field | string | Fieldname | |
provider | string | One of the following three strings is possible: CovetoProvider, SoftgardenProvider, HR4UProvider |
Link to Job
Returns the permalink of the current job in the loop
[j2wp_joblink]
Applicant Link
Outputs a link to apply
[j2wp_application_link type=button text="Jetzt Bewerben"]
Parameters | Type | Standard | Description |
---|---|---|---|
type | string | link | Either “link” or “button” |
text | string | Apply Now | The text of the link or button |
Job Salary
Displays the salary for the job
[j2wp_job_salary tag=div]
Parameters | Type | Standard | Description |
---|---|---|---|
tag | string | div | HTML element in which the salary is displayed |
Number of jobs
Indicates the current number of jobs. When used on the job list, the count is updated accordingly if the filter changes
[j2wp_job_count]
Contact person image
Provides a placeholder image for the contact person
[j2wp_job_contact_person_image]
Extension:
- Filter: j2wp_job_contact_person_image
- Parameters:
- $image: A J2WP image object where you can set the URL, height, and width
- $job: The J2WP job object of the currently displayed job
- Return: J2WP picture objekt
- Parameters:
Example 1: Filter to load the Coveto contact person image from the WordPress media library using the name as a mapping
add_filter("j2wp_job_contact_person_image", function(j2wp_Image $image, Job $job){
$contactPersonFirstName = strtolower($job->getRawField("aa_ansprechpartner->nachname"));
$contactPersonLastName = strtolower($job->getRawField("aa_ansprechpartner->vorname"));
$query = new WP_Query([
'post_type' => 'attachment',
'post_status' => 'inherit',
'posts_per_page' => -1,
]);
if ($query->have_posts()) {
foreach ($query->posts as $media_post) {
$title = strtolower($media_post->post_title);
if (str_contains($title, $contactPersonFirstName) && str_contains($title, $contactPersonLastName)){
$image->setURL(wp_get_attachment_url( $media_post->ID ));
return $image;
}
}
}
wp_reset_postdata();
return $image;
}, 10, 2);
Example 2: Loading an external resource defined in the Coveto free text field 2, with modified image size
add_filter("j2wp_job_contact_person_image", function($image,$job) {
$url = $job->getRawField("freitextfeld_2");
$image->setURL($url);
$image->setHeightInPixels(200);
$image->setWidthInPixels(200);
return $image;
},10,2);