Easy Job Sync Documentation

Back to the plugin

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]
ParameterTypStandardDescription
default textstringAllWhat the option for all entries should be called.

Filter by custom metafield:

[j2wp_CustomMetaFilter]

Filter by employment type:

[j2wp_EmploymentTypeFilter]
ParameterTypStandardDescription
default textstringAllWhat the option for all entries should be called.

Filter by location

[j2wp_LocationFilter]

Filter by Name:

[j2wp_NameFilter]

Reset all filters

[j2wp_ResetLink]
ParameterTypStandardDescription
link textstring„reset filters“Text for the reset link in the frontend

Filter button

Freely positionable button to submit all filters that are integrated on the current page.

Submit
ParameterTypStandardDescription
buttontextstring„Search“Submit

Order Filter

Sort the list of jobs

[j2wp_OrderFilter]
ParameterTypStandardDescription
Order bystringTitleThe field to sort by.

Options
– title
– date
orderstringASCThe direction in which to sort.

Options
– ASC
– DESCRIPTION

Custom Dropdown Filter

Created a custom drop-down field to sort the job list.

[j2wp_CustomDropDownFilter]
ParameterTypStandardDescription
KeystringThe field to filter by.
default textstringAllWhat the option for all entries should be called.

Job List

Represents the list of jobs.

[j2wp_joblist]
ParameterTypStandardDescription
posts_per_pagenumber-1Number of jobs displayed
-1 = all jobs
Scroll to jobsboolFalseWhether to automatically scroll to the job list when loading jobs
display_modestringList„"List" or "Grid" view of the jobs
provider_idstringnullIf you enter a provider ID here (from the admin page), only jobs from the selected provider will be displayed

Pre-filtered job list

Displays a pre-filtered and pre-rendered list of jobs.

[j2wp_prefiltered_joblist]
ParameterTypStandardDescription
posts_per_pagenumber-1Number of jobs displayed
-1 = all jobs
meta_keystringnull (type)If only „meta_key“ is specified, the system checks whether the meta field exists. If „meta_value“ is also specified, it is used as the key.
meta_valuestringnull (type)Jobs are filtered whether they have a meta field with the same value.

Display specific fields

Returns the value of the specified field.

[j2wp_custom_field field="freitextfeld1" provider="CovetoProvider"]
ParameterTypStandardDescription
fieldstringField name
SupplierstringOne of the following four strings is possible:
CovetoProvider
Softgarden Provider
HR4UProvider
PersonioProvider

Link to the job

Returns the permalink for the current job in the loop.

[j2wp_joblink]

Applicant Link

Displays a link to apply.

[j2wp_application_link type="button" text="Apply Now"]
ParameterTypStandardDescription
TypestringlinkEither „link“ or „button“
textstringApply NowThe text of the link or button

Job Salary

Output the salary for the job

}[j2wp_job_salary tag="div"]
ParameterTypStandardDescription
tagstringdivisionHTML element where the salary is displayed

Number of jobs

Indicates the current number of jobs. If used on the job list, the number adjusts when the filter changes.

[j2wp_job_count]

Contact person image

Displays a placeholder image for the contact person

[j2wp_job_contact_person_image]

Extension

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 a changed 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);