Questions tagged [wpml]

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

414 questions
4
votes
1 answer

How to make work 'wp_set_script_translations' function automatically?

I'm trying to make 'wp_set_script_translations' work with theme in conjunction with wpml. I had implemented all the recommendations from Wordpress Codex. WPML plugin generates file in format "locale-domain-handle.json" in…
Yura Kosyak
  • 401
  • 3
  • 16
4
votes
1 answer

Changing "return to shop" URL for all languages with WPML plugin

In my WooCommerce Web shop I would like to change the "Return to shop" URL to a Custom URL. I tried to use the code below in the function.php file of my active theme, but it doesn't work. On my website, I have five active languages managed by WPML…
4
votes
2 answers

How to determine language with twig and wmpl

I am trying to determine the language in a wordpress / twig website. I tried the following in twig : {{ wpml_current_lang }} But that doesnt seem to work. Any idea's or suggestions ?
Michael
  • 41
  • 2
4
votes
1 answer

How to avoid affecting other queries when using posts_orderby?

In WordPress as you must already known, when using get_posts() or query_posts() or even WP_Query, it is not possible to order the returned posts by specifying a list of post ID in the order we want. Instead we have to loop through the results and…
Community
  • 4,922
  • 7
  • 25
  • 37
3
votes
3 answers

How to switch between 2 languages with a button and not a dropdown with WPML?

It's silly to have dropdown when you have only two languages. Makes sense if there are more. I want to have just a simple button that will switch to the other language and I can't find any guide on google.
3
votes
1 answer

WordPress Error "A variable mismatch has been detected."

I am receiving this WordPress error when I am trying to delete a gravity-form-coupon feed: A variable mismatch has been detected. Note: I am creating the feeds dynamically (PHP). I tried to debug it with all the debugging plugins and enabled all…
3
votes
1 answer

WPML if ( ICL_LANGUAGE_CODE==('en' or 'es') not working

I am using WPML on my site and I am using the ICL_LANGUAGE_CODE== to change what appears in one template depending on the language. At the moment if the language is english something shows, if it is any other language nothing shows. I wanted to…
Jolo
  • 67
  • 1
  • 1
  • 9
3
votes
0 answers

wp_insert_posts are not shown in wp-admin, all posts section

I have multi-site enabled WordPress installation into Amazon server with WPML installation too so I tried this and this, but I had no luck. wp_insert_post(array('post_title'=>'test_title','post_content'=>'test_content',…
Suba Sah
  • 157
  • 8
3
votes
3 answers

WPML same slug(url) different language

I have this site : example.com/watches (watches is a custom post type) There are two available languages : EN(default language), GR. When i change to GR (while on page example.com/watches) it redirects to example.com/el/watches which is right. When…
Antonios Tsimourtos
  • 1,676
  • 1
  • 14
  • 37
3
votes
1 answer

Arabic url is not working in WordPress on Windows IIS Server

Urls with Arabic slugs are going to 404 on IIS Windows Server and working fine on Apache server. When I have Arabic in URL like /ar/product-categories/الأرز/ It is redirecting to 404 when I edit the slug into English it's working I have installed…
Owais Aslam
  • 1,577
  • 1
  • 17
  • 39
3
votes
1 answer

WPML - Cart item data custom Fields don't update when switching language

I am using Woocommerce plugin with WPML Multilingual plugin, and I simply can't get to work like I would expect. My products have serveral Custom Fields that I need to display in the cart, Checkout, Order views and emails notifications. The Fields…
mbg
  • 448
  • 4
  • 7
3
votes
1 answer

How to translate Wordpress content of post or page with .po files

For Wordpress/WooCommerce, I want to find a plugin to translate content of post, pages, custom post-types, like based on .po files, not WPML because a lot of paragraph need to reuse that. What can I use for this purpose?
chickensoup
  • 334
  • 1
  • 17
2
votes
1 answer

Change language in function jQuery

I'm a bit new to all coding, and I want to ask for some help, please! I have this code: $(document).ready(function() { $('#loadMore').click(function() { $('#loadMore').html('No More Post'); }); }); How can set it in different…
Tanya Nami
  • 66
  • 8
2
votes
1 answer

Using WPML wordpress with Multilingual laravel application as subfolder

I have a multilingual laravel application. My url structure like that: https://example.com/en/paths https://example.com/es/paths I installed wordpress in /public/blog. It is working successfully. I also installed WPML plugin in wordpress then url…
sportakal
  • 135
  • 2
  • 11
2
votes
0 answers

Wordpress string translation

i have follow issue. I want to add translation to the output in wordpress. In some sentences are variables. So i looked after a possibility to translate the sentence with the variable. I found out that i can use printf with %s placeholder. If i…
Stefan
  • 61
  • 6
1
2
3
27 28