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
- 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 -
- 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 5 replies, has 2 voices.

Last updated by Long Nguyen 4 months, 3 weeks ago.

Assisted by: Long Nguyen.

Author Posts
April 16, 2024 at 5:04 pm #15527368

Bahij

Tell us what you are trying to do?
I created locations in english and french then i linked them together.
When the english is published it shows in the french and english page, so if i publish the french too the english and french content will show in both pages the english and french.

Is there any documentation that you are following?
None because i cannot find any

Is there a similar example that we can see?
Don't know

What is the link to your site?
EN-> hidden link
FR-> hidden link

Here is a link of a video i made so you can have a full understanding of the situation.
hidden link
or
hidden link

April 17, 2024 at 4:18 am #15528990

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi Bahij,

Thank you for contacting WPML support, I’m happy to help you with this issue.

It could be a compatibility issue between YITH Store Locator and WPML. To be able to report the compatibility issue we need to replicate the issue on a clean installation. I created a clean installation of WordPress, WPML, and all necessary WPML add-ons. You can access the WordPress dashboard using the link below:
hidden link

Kindly follow the steps below:

- Don’t restore your site there.
- Install YITH Store Locator plugin.
- Try to replicate the issue with minimal steps.
- Then let me know the steps to replicate it.

Looking forward to your reply.
Thanks

April 17, 2024 at 2:19 pm #15533187

Bahij

Hi Long Nguyen,

Your request &
- Don’t restore your site there.
=Understrood

- Install YITH Store Locator plugin.
= Installed pro version with license temporary

- Try to replicate the issue with minimal steps.
= i created one page in french and one page in english with minumal information.

- Then let me know the steps to replicate it.
= please go to either french or english page front end, click on the view all stores and you will see that english and french stores are on the same page, so it shows two stores instead of one for each language.

By the way just to let you know i created a ticket too with YITH plugin authors to look at the situation, But if i remember well they told me couple of years ago for another website to communicate wtih WPML to solve the issue. But i never had the chance to do so since i was too busy and i gave up. But this time we really need to make things work on my end at the head quarters

April 19, 2024 at 2:29 am #15541581

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

I found a way to display locations in the current language on the sandbox site. Please try to apply the workaround on your site and let me know if it helps:

1. Edit the file /wp-content/plugins/yith-store-locator-for-wordpress/templates/frontend/shortcodes/store-locator/results.php

2. Around line 28, replace the code

$store = YITH_Store_Locator_Store( $stores[ $i ]['id'] );

with this one

$store = YITH_Store_Locator_Store( $stores[ $i ]['id'] );

$store_language_details = apply_filters( 'wpml_post_language_details', NULL, $stores[ $i ]['id'] ) ;
$current_lang = apply_filters( 'wpml_current_language', NULL );

if( $store_language_details['language_code'] != $current_lang ) continue;

❌ IMPORTANT: Please backup your database and website before proceeding ❌

Looking forward to your reply.
Thanks

April 29, 2024 at 6:37 pm #15578530

Bahij

Hi i will let you know this week when i do the test, thansk for your patience

May 2, 2024 at 1:32 am #15585054

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

I'm waiting for your feedback.

Thanks.

The topic ‘[Closed] YITH Store Locator Duplicate content/locations’ is closed to new replies.