Polylang is one of the most well known multilingual plugins for Wordpress
Questions tagged [polylang]
217 questions
1
vote
0 answers
Show existing post if no translation instead of going to home page in polylang
I'm using Polylang to support multiple languages on my site. Right now, if I'm on a post that say is in English and if I click a flag for which it has no translation (e.g. French), then I get taken to the home page in French. I don't want that. I…

Elliptica
- 3,928
- 3
- 37
- 68
1
vote
1 answer
How to implement Polylang functions in my theme's php file?
I am translating a site with Polylang that was created by someone else using a custom theme. Some strings couldn't be found by Polylang, so I need to manually register them for Polylang to see. Now, some of the strings were pretty easy to translate…

anzorandom
- 11
- 1
1
vote
1 answer
Using Wordpress add_rewrite_rule with Polylang plugin
I am using this code to add rewrite_rule for Wordpress to create Child posts For another post type
add_action( 'init', function() {add_rewrite_rule( '^property/(.*)/units/([^/]+)/?$','index.php?property_units=$matches[2]','top' );});
add_filter(…

Sabry Suleiman
- 182
- 9
1
vote
1 answer
Translate string in Polylang
I added a custom snippet to my woocommerce site and now I'm having trouble translating the string to Polylang.
I needed the snippet to add a text above the payment methods, and it works fine, it was added via the Code Snippet plugin…

TonyDiMasi
- 43
- 6
1
vote
0 answers
Polylang change language automatically
Theres any way to change the language of frontpage, automatically with the polylang?
If the user do the login, the page language change automatically.
I'm using this:
PLL()->curlang = PLL()->model->get_language( 'fr' );
The header and footer…

freixo
- 21
- 6
1
vote
0 answers
Wordpress Polylang language dropdown switcher with flags only in widget
I use polylang plugin as the multilanguage solution for my website.
In my menu I use the polylang widget with Elementor builder. In the classic polylang menu made in your wordpress you could add polylang widget switcher where you could choose the…

Lubo Masura
- 1,034
- 6
- 20
1
vote
1 answer
Translate Woocommerce Add to cart button & Cart widget
I have a problem with translating the Add to cart button on woocommerce.
My website is: http://test.mk/OPA
The website is in albanian and english. First language is English.
I have installed Polylang Pro plugin and also tried with Loco translate.
I…

Simona Nikoloska
- 13
- 3
1
vote
1 answer
Polylang custom language switcher
How to create a custom polylang language switcher like this https://prnt.sc/vnj7b3 ?
Html markup to be used :
Parent :
EN

Ion T
- 119
- 1
- 9
1
vote
0 answers
How to link seperate language pages in Polylang string translation?
I have a floating widget in my footer and I want to give it a link to another page. I have 4 languages in my website "Turkish" "English" "Russian" and "Arabic"
I want this widget's link to redirect page "target page"
If im on Turkish page link…

özgür kuş
- 93
- 1
- 9
1
vote
1 answer
Polylang - How to add " add_filter" in a plugin or mu-plugin before the action ‘plugins_loaded’ has been fired
I'm trying to change the flag to a custom flag in svg, and I found this "pll_custom_flag" function in their document(https://polylang.pro/doc/filter-reference/)
There, it says "The filter needs to be added in a plugin or mu-plugin before the action…

Ryo
- 75
- 8
1
vote
0 answers
How to remove Category URL from Wordpress Polylang
How to remove category URL WordPress Polylang
I have removed category URL by setting Search Appearance > Taxonomy Category remove in Yoast SEO and also have a correct setup in the WordPress settings permalink.
However Polylang doesn't seems to…

Krishna
- 939
- 1
- 11
- 16
1
vote
1 answer
polylang custom product attributes
Is it possible to translate custom product attributes using Polylang Pro?
I don't see anywhere the option to translate a custom product attribute.

Chris
- 31
- 4
1
vote
1 answer
Using Polylang to return terms in currently selected language
I'm using this basic loop to retrieve the category name:
$terms = get_the_terms( $product_id, 'product_cat' );
//var_dump ($terms);
if($items){
foreach ( $terms as $term ) {
//$cat_id = $term->id;
$cat_name = $term->name;…

Evakos
- 152
- 2
- 11
1
vote
1 answer
How to share metadata custom fields across languages with Polylang plugin
I am building a little plugin in Woocommerce to add some custom fields. It's very simple:
function save_option_fields($post_id) {
update_post_meta($post_id, '_energy', $_POST['_energy']);
update_post_meta($post_id, '_fat',…

pzin
- 4,200
- 2
- 28
- 49
1
vote
1 answer
Can't translate string in Functions.php using Polylang Wordpress Plugin
I have a custom code in functions.php (Wordpress) and I want to be able to translate the string "Teclado para hóspedes". No matter what the string it's not translated. Am I doing something wrong?
add_action( 'woocommerce_review_order_before_submit',…

Renato Pimpão
- 135
- 2
- 11