Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- - 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00
- - - - - - -

Supporter timezone: America/Lima (GMT-05:00)

This topic contains 0 replies, has 1 voice.

Last updated by Andreas W. 2 days, 5 hours ago.

Assisted by: Andreas W..

Author Posts
March 7, 2025 at 6:48 pm #16789732

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

I would like to provide you with the following workaround:

1) Go to "WPML > Settings > Post Type Translation" and set the forms as translatable
2) Apply the following workaround:
Open the .../\wp-content/plugins/wp-job-manager-applications/includes/wp-job-manager-applications-functions.php file

Look for line 302

Replace:

function get_application_forms() {
	$posts = new WP_Query(
		array(
			'post_type'        => 'job_application_form',
			'posts_per_page'   => - 1,
			'suppress_filters' => true,
			'orderby'          => 'title',
			'order'            => 'ASC',
		)
	);

	$default_form = WP_Job_Manager_Applications_Default_Form::get_default_form();

	if ( $posts->post_count <= 1 ) {
		return null;
	}
	$application_forms = [];

	if ( array_key_exists( 'ID', $default_form ) ) {
		$application_forms[ $default_form['ID'] ] = $default_form['post_title'];
	}

	foreach ( $posts->posts as $post ) {
		$application_forms[ $post->ID ] = $post->post_title;
	}
	return apply_filters( 'job_application_forms', $application_forms );
}

With:

function get_application_forms() {
	$posts = new WP_Query(
		array(
			'post_type'        => 'job_application_form',
			'posts_per_page'   => - 1,
			'suppress_filters' => false, // replace true with false
			'orderby'          => 'title',
			'order'            => 'ASC',
		)
	);

	$default_form = WP_Job_Manager_Applications_Default_Form::get_default_form();

	if ( $posts->post_count < 1 ) { // replace <= with <
		return null;
	}
	$application_forms = [];
  /* comment out this part if you don't want to see the default form in other languages
	if ( array_key_exists( 'ID', $default_form ) ) {
		$application_forms[ $default_form['ID'] ] = $default_form['post_title'];
	}*/

	foreach ( $posts->posts as $post ) {
		$application_forms[ $post->ID ] = $post->post_title;
	}
	return apply_filters( 'job_application_forms', $application_forms );
}

3) Go to "Application forms" and translate them
4) Go to "Job listing", edit the job, and select the right form in the default language (EN)
5) Resave your translation
6) On the frontend visit the FR job and you will see the FR application form

Please note the following:
If you get any 404 errors then that is because the CPT slug isn't translated. You can fix that in WPML > Settings > Post Type Translation

Please confirm if this solved the issue for you.