Questions tagged [wpml]

WordPress Multilingual (WPML) is a commercial plugin that adds various multilingual capabilities to WordPress.

414 questions
1
vote
2 answers

Use Twig in Wordpress plugin , but clashes with WPML

Tried to add Twig to my WordPress-plugin I'm working on, but it seems like it clashes with my sites WPML installation. I get the following PHP Error: PHP Fatal error: Cannot redeclare twig_cycle() (previously declared in…
1
vote
0 answers

Get active currency and unset countries WooCommerce

I am using WooCommerce with WooCommerce Multilingual. So I am using different currencies. I want to unset billing and shipping countries based on the current active currency. I found this function to unset countries: function…
CJabber201
  • 97
  • 8
1
vote
0 answers

Change or redirect Wordpress URL code for default WPML language

I have a Wordpress site with WPML and for SEO reasons I need to stick to a fixed URL pattern for all the languages (including the default language): https://my-site.com/de-de Unluckily the WPML default pattern is like…
1
vote
0 answers

Use reactjs with wpml to show translated pages

I have a headless wordpress for backend and I am using reactjs for the frontend. I use the wp rest api for fetching my posts data, but I can not connect the translated pages together. I have the wpml plugin installed with the swedish as default…
DigitalSM
  • 113
  • 1
  • 2
  • 10
1
vote
0 answers

Why is WPML creating multiple file entries after saving

I have a Wordpress installation using WPML, ACF, and Custom Post Types. When I save a new entry for any custom post-type (also for Page) it is saving it as 2 or more entries. When I erase one of those entries, all of them are gone. When I try to…
pixelcrash
  • 31
  • 1
  • 3
1
vote
2 answers

Redirecting URL with paramter to top-level domain

I have been trying to search but no luck yet. Found different options about redirecting but nothing like what I'm looking for. So currently the website URLs contain lang parameter like ?lang=en, ?lang=ru, ?lang=fi. Parameters are on the very end of…
1
vote
0 answers

Wordpress url parameter "country" on every page

I would like to use a custom URL parameter for my wordpress site, called country. This parameter should only be used internally. For translation I use WPML. I know that it would be possible to create a language for every country / language…
Josef
  • 229
  • 1
  • 2
  • 9
1
vote
1 answer

How do i know the language of post/page in wordpress using wpml?

I am using wpml by using this code i can get the id of post/page $id = icl_object_id($course_id, 'page', false, ICL_LANGUAGE_CODE); i want to know that how can i get the language type of post/page i have tried WP_query but it was futile
Abdul Rehman
  • 119
  • 1
  • 1
  • 7
1
vote
2 answers

How to hide uncategorized on different languages

I tried code below to hide a Uncategorized category, but in others languages this category is visible, how to fix it function my_product_subcategories_arg( $args ) { $uncategorized = get_option( 'default_product_cat' ); $args['exclude'] =…
1
vote
1 answer

How can we differentiate between translated and orignal post in wpml?

I am making a custom author.php file in wordpress and showing post there but thing is it is also showing translated data too, like my web is in Enligsh and it is translated in Chinese how can i specify the between post which one is English which is…
Abdul Rehman
  • 119
  • 1
  • 1
  • 7
1
vote
1 answer

WooCommerce, Code snippet and WPML: Allow translation from new country

I have added a new country to WooCommerce using Code snippet plugin with the following: add_filter( 'woocommerce_countries', 'add_my_country' ); function add_my_country( $countries ) { $new_countries = array( 'ESTI' => __( 'Estonia…
1
vote
1 answer

Trying to rewrite URLs for wordpress / nginx / WPML install

I have some wordpress experience, but it's my first time using Nginx. I have a WordPress installation running on Nginx. I added WPML (multi-language plugin) https://wpml.org/ The current URL structure is https://www.maindomain.com/blog/es/.... &…
same_day
  • 13
  • 3
1
vote
1 answer

Wordpress WPML plugin , get_terms returns data only for current language , i want it return for all available languages?

I'm using WPML Plugin v 4.4.9 and Wordpress v5.6.1 I want the get_terms function to return results for all available languages , ex : for category taxonomy (using some custom meta) , it only returns one result for the current language , how can i…
Alin Razvan
  • 1,451
  • 13
  • 18
1
vote
1 answer

Rewrite in .htaccess wordpress

I have this url right now: www.mywebsite.com/pt-br/index But I need to change for: www.mywebsite.com/pt/index Is that possible using .htaccess? I use WPML plugin in wordpress for languages. Thanks! Sorry for my english, i'm from Argentina! My…
Yani Parga
  • 11
  • 2
1
vote
1 answer

ACF checkbox - translate

I need to translate 3 value in a checkbox acf option. The problem is i have already create my 200 woocommerce products and if i translate in backoffice (acf), i have to change the translate value in each product. I'm looking for a solution with…
microb14
  • 453
  • 4
  • 16