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.

This topic contains 1 reply, has 2 voices.

Last updated by Subash Chandra Poudel 1 year, 11 months ago.

Assisted by: Subash Chandra Poudel.

Author Posts
July 19, 2023 at 3:43 pm #14067503

sergioP-52

Hello.

I have a WordPress installation that uses the WPML compatible WpRentals template.

the template creates a new custom post type with the home listings. Each listing has custom fields, for example the price.

When creating the version in a new language, I make a copy of the content and modify the text, leaving the rest of the parameters unchanged.

Initially everything is fine and everything looks fine in each language version, and it switches without any problem.

The template includes a wpml-config.xml file which I attached.

The problem comes when I change the price of the original listing, the new price does not appear in the translated versions of that same listing.
The config file has <custom-field action="copy">property_price</custom-field>, but it doesn't seem to detect it correctly.

The same thing happens with other custom fields.

In the wpml configuration, in the post types section, I have
Listings (estate_property): Translatable, only show translated items (without the lock image)

How can I know what may be happening?

Thank you!

----

<wpml-config>
<custom-types>
<custom-type translate="1">estate_agent</custom-type>
<custom-type translate="0">wpestate_invoice</custom-type>
<custom-type translate="0">membership_package</custom-type>
<custom-type translate="1">estate_property</custom-type>
</custom-types>
<taxonomies>
<taxonomy translate="1">property_category</taxonomy>
<taxonomy translate="1">property_action_category</taxonomy>
<taxonomy translate="1">property_city</taxonomy>
<taxonomy translate="1">property_area</taxonomy>
</taxonomies>
<custom-fields>
<custom-field action="copy">prop_featured</custom-field>
<custom-field action="copy">agent_email</custom-field>
<custom-field action="copy">agent_facebook</custom-field>
<custom-field action="copy">agent_linkedin</custom-field>
<custom-field action="copy">agent_mobile</custom-field>
<custom-field action="copy">agent_phone</custom-field>
<custom-field action="copy">agent_pinterest</custom-field>
<custom-field action="copy">agent_position</custom-field>
<custom-field action="copy">agent_skype</custom-field>
<custom-field action="copy">agent_twitter</custom-field>
<custom-field action="copy">property-basement</custom-field>
<custom-field action="copy">property-date</custom-field>
<custom-field action="copy">property-external-construction</custom-field>
<custom-field action="copy">property-garage</custom-field>
<custom-field action="copy">property-garage-size</custom-field>
<custom-field action="copy">property-roofing</custom-field>
<custom-field action="copy">property-year</custom-field>
<custom-field action="copy">property_address</custom-field>
<custom-field action="copy">property_agent</custom-field>
<custom-field action="copy">property_area</custom-field>
<custom-field action="copy">property_basement</custom-field>
<custom-field action="copy">property_bathrooms</custom-field>
<custom-field action="copy">property_bedrooms</custom-field>
<custom-field action="copy">property_city</custom-field>
<custom-field action="copy">property_country</custom-field>
<custom-field action="copy">property_county</custom-field>
<custom-field action="copy">property_date</custom-field>
<custom-field action="copy">property_external_construction</custom-field>
<custom-field action="copy">property_garage</custom-field>
<custom-field action="copy">property_garage_size</custom-field>
<custom-field action="copy">property_google_view</custom-field>
<custom-field action="copy">property_label</custom-field>
<custom-field action="copy">property_latitude</custom-field>
<custom-field action="copy">property_longitude</custom-field>
<custom-field action="copy">property_lot_size</custom-field>
<custom-field action="copy">property_price</custom-field>
<custom-field action="copy">property_roofing</custom-field>
<custom-field action="copy">property_rooms</custom-field>
<custom-field action="copy">property_size</custom-field>
<custom-field action="copy">property_state</custom-field>
<custom-field action="translate">property_status</custom-field>
<custom-field action="copy">property_year</custom-field>
<custom-field action="copy">property_zip</custom-field>
<custom-field action="copy">custom_price</custom-field>
<custom-field action="copy">mega_details</custom-field>
</custom-fields>
<admin-texts>
<key name="wprentals_admin">
<key name="wpestate_custom_fields_list">
<key name="add_field_label">
<key name="*"/>
</key>
</key>
<key name="wpestate_set_search">
<key name="adv_search_label">
<key name="*"/>
</key>
</key>
</key>
<key name="wpestate_custom_fields_list">
<key name="add_field_label"/>
</key>

<key name="wp_estate_property_features_text"/>
<key name="wp_estate_date_lang"/>
<key name="wprentals_admin">
<key name="wp_estate_shared-room">
<key name="url"/>
<key name="id"/>
<key name="thumbnail"/>
</key>
<key name="wp_estate_dorm">
<key name="url"/>
<key name="id"/>
<key name="thumbnail"/>
</key>
<key name="wp_estate_dormshared-room">
<key name="url"/>
<key name="id"/>
<key name="thumbnail"/>
</key>
</key>
</admin-texts>
</wpml-config>

July 21, 2023 at 4:34 pm #14081279

Subash Chandra Poudel

Hi there,

You said "https://wpml.org/documentation/translating-your-contents/using-different-translation-editors-for-different-pages/#how-to-use-manual-translation" do you mean you duplicate the post in the secondary language and translate it manually as explained in the next link?

https://wpml.org/documentation/translating-your-contents/using-different-translation-editors-for-different-pages/#how-to-use-manual-translation

If yes, then it is expected that posts that are translated manually do not sync the content with the original language posts regardless of the WPML config you have for the custom fields in the post. In this case you will need to manually update the translation when you update some data or text in the primary language. So, to make it easier for you in future, I recommend translating the posts with WPML Translation editor instead.

Hope this helps. Please let me know with more details on the issue if you need further help with the issue or if I am missing something here.

Regards,
Subash