Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
If you're experiencing issues with automatically setting the correct listing type for the translated listing post,
Solution:
We recommend trying the following steps:
1. Navigate to

wp-content/themes/my-listing/templates/add-listing/form-fields/admin/select-listing-type.php

in your theme files.
2. Add the following custom code after line number 4:

//convert this slug in current language
$post_id = get_page_by_path($value, OBJECT, 'case27_listing_type');
$current_post_id = apply_filters('wpml_object_id', $post_id->ID, 'case27_listing_type');
$value = get_post_field('post_name', $current_post_id);

3. Save the changes and check if the issue persists. We have already added the code on the staging site for you to verify.
Please consult with the theme author to ensure that this modification is acceptable.

Keep in mind that this solution might be outdated or not applicable to your case. If it doesn't resolve your issue, we highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you still need assistance, please open a new support ticket.

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.

Tagged: 

This topic contains 7 replies, has 3 voices.

Last updated by Bruno Kos 1 year, 5 months ago.

Assisted by: Bruno Kos.

Author Posts
April 5, 2024 at 4:42 am

gregorH-4

Automatically set the correct listing type to the translated listing post

April 5, 2024 at 7:23 am #15486501

gregorH-4

we have to resolved this issue please i need help any superior last ticket reoloved very well please give me response too quick.. its very bad user experience

April 5, 2024 at 9:38 am #15487195

gregorH-4

Please give me a response

April 5, 2024 at 10:13 am #15487258

gregorH-4

Is anyone there for solving that problem

April 5, 2024 at 11:16 am #15487642

Shekhar Bhandari
WPML Supporter since 03/2015

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

While someone else will help you debug the issue further, as a workaround, can you try the following and see if it helps:

- Go to wp-content/themes/my-listing/templates/add-listing/form-fields/admin/select-listing-type.php hidden link

- Add the following code after line no.4

//convert this slug in currrent language
$post_id = get_page_by_path($value, OBJECT, 'case27_listing_type');
$current_post_id = apply_filters('wpml_object_id', $post_id->ID, 'case27_listing_type');
$value = get_post_field('post_name', $current_post_id);

and save.

Then check if the issue exists, I already added the code on the staging site so you can check if it works there.

Since this is something edited on the theme, I suggest to ask the theme author if it's okay to edit the file as above.

Thanks

April 6, 2024 at 11:09 am #15490463

gregorH-4

thanks its working i am checking that listing type selected working with respective to language

now if i manually post open in german language edit and update its working same for other languages

now is there any solution just all posts/listings in all languages just once updated trigger

April 8, 2024 at 7:32 am #15492775

gregorH-4

Are you replying me please

April 8, 2024 at 10:21 am #15493596

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

Handling this in chat.