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]
ParametersTypeStandardDescription
default_textstringAllWhat the option for all entries should be called

Filter by custom metafield:

[j2wp_CustomMetaFilter]

Filter by type of employment:

[j2wp_EmploymentTypeFilter]
ParametersTypeStandardDescription
default_textstringAllWhat the option for all entries should be called

Filter by place:

[j2wp_LocationFilter]

Filter by name

[j2wp_NameFilter]

Undo all filters

[j2wp_ResetLink]
ParametersTypeStandardDescription
linktextstring„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]
ParametersTypeStandardDescription
buttontextstring„Search“Text for the submit button in the frontend

Order filter

Sort the list of jobs

[j2wp_OrderFilter]
ParametersTypeStandardDescription
orderbystringtitleThe field to sort by.

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

Options:
– ASC
– DESC

Custom Drop Down Filter

Create a custom dropdown field to sort the job list.

[j2wp_CustomDropDownFilter]
ParametersTypeStandardDescription
keystringThe field to filter by.
default_textstringAllWhat the option for all entries should be called

Job-List

Displays the list of jobs

[j2wp_joblist]
ParametersTypeStandardDescription
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

Pre-filtered job list

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

[j2wp_prefiltered_joblist]
ParametersTypeStandardDescription
posts_per_pagenumber-1Number of jobs displayed -1 = all jobs
meta_keystringnull (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_valuestringnull (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"]
ParametersTypeStandardDescription
fieldstringFieldname
providerstringOne 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"]
ParametersTypeStandardDescription
typestringlinkEither “link” or “button”
textstringApply NowThe text of the link or button

Job Salary

Displays the salary for the job

[j2wp_job_salary tag=div]
ParametersTypeStandardDescription
tagstringdivHTML 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:

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