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 translating the 'destinations' section in French using Elementor on your site, and the Spanish translations are working fine, the issue might be related to the 'Travel Management' plugin. Specifically, the shortcode nd_travel_destination_packages used in the Elementor template might be referencing an incorrect language ID for translated posts, causing it to display only the first destination.
Solution:
We recommend modifying the plugin's code as a temporary workaround. Please note, this plugin and the parent theme are not compatible with WPML, and any changes might be overwritten during plugin updates. Here are the steps:
1. Navigate to

wp-content\plugins\nd-travel\inc\metabox\mtb-cpt-3.php

and around line 164, replace:

$nd_travel_destinations_args = array( 'posts_per_page' => -1, 'post_type'=> 'nd_travel_cpt_3' );

with:

$nd_travel_destinations_args = array( 'posts_per_page' => -1, 'post_type'=> 'nd_travel_cpt_3', 'suppress_filters' => false );

2. Edit the translated destination in the admin panel, select the correct destination, and save.
Since this solution might become outdated or might not apply to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the issue persists, 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 19 replies, has 2 voices.

Last updated by Nicolas V. 1 year, 10 months ago.

Assisted by: Nicolas V..

Author Posts
June 11, 2024 at 7:56 pm #15728932

Nicolas V.
WPML Supporter since 12/2021

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

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

Hi,

I'm sorry but credentials seem incorrect: Invalid login details. Could you please check that for me.

June 13, 2024 at 2:08 pm #15736691

Nicolas V.
WPML Supporter since 12/2021

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

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

Hello,

I'm sorry but we're running into circle here 😉
It requires a two step verification with a code like the previous credentials.

Could you please deactivate that two step verification? Or use my email so I can receive the code (nicolas.v [@] onthegosystems.com)

June 14, 2024 at 9:17 pm #15741301

Nicolas V.
WPML Supporter since 12/2021

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

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

Hello,

Thanks for the access. The code provided wasn't implemented. I followed the instructions provided. Then I edited in the WordPress editor all 3 destinations (it seems that you deactivated our editor).

For all 3 destinations, I selected the parent destination and then in the Elementor builder I simply added "FR" at the end of the heading (except for Puno which was still translated in French)

screenshot-2024.06.14-16_17_04.png
June 17, 2024 at 5:10 pm #15746612

davidS-40

Hello Nicolas

I tried putting the same code to my child theme files but wasnt work
is it possible to use it in this way?

June 17, 2024 at 8:55 pm #15746889

Nicolas V.
WPML Supporter since 12/2021

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

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

Hello,

I think there is a confusion here. Your theme has its own plugin and the modification needs to be done in the plugin's code. So it can't be added in the parent or child theme, it needs to be done at the plugin level. That's why I was warning you with this message "Which means that every time you update the plugin your code will be overwritten and you will need to edit it again."

I think the confusion comes from the fact that I recommended you to look for a compatible theme (but that's because the plugin is from the theme author and required to add functionalities to the theme itself.

I hope it make sense now.

As you can see the file to modify is in the plugin folder: wp-content\plugins\nd-travel\inc\metabox\mtb-cpt-3.php