Articles of plugin polylang

How to Customize Polylang Language Items

I am using Polylang plugin with WordPress 4.3.1, Can you please let me know if there is a way to display language items in short abbriviation like En for English or CH for Chinese I am using this code to display the active languages <?php pll_the_languages();?> and the result looks like Can you please let […]

Polylang get non-current language/s

I am using Poly language plugin to build my own custom multi language website Previously i was using Q_translate it’s working fine with me, but i need to use poly language now, so excuse me if there my experience with poly language is poor. I need to build my custom language switcher like this website […]

get_comments not working consistantly with post_id

I am trying to get comments from another post. I am getting the post_id and doing a check to see if it has comments I can get the comments for the current post every time but for the other post I am getting mixed results (I did get it working but am unable to reproduce […]

WP_Query post_parent parameter always returns children of current page

Well the title gives it all away… Here’s the code: $args = array( “post_type” => “page”, “post_parent” => $cat, // runs through a loop of 5, 128, 130 “posts_per_page” => -1 ); print_r($args); $postsLang = new WP_Query($args); while ($postsLang->have_posts()) { $postsLang->the_post(); $postID = get_the_ID(); array_push($result, $postID); } wp_reset_query(); print_r($result); Here the print_r outputs: Array ( […]

polylang + category/tag custom language link

under wordpress user can define url part for categories/tags, e.g., where category is user defined string part. Is there a way to define “category” (same goes for tags) for multilanguage page, so that for en category=categoryen, for ru category=kategorij, etc? As a results links should be and Any ideas if this is […]

Multisite – Parent site with Polylang with different domains for each language

A client wants a WordPress multisite installation where they will have over 100 child sites. The child sites will either have its own domain or use the subdomain. This is all fine and good but now he’s requesting that the parent site to have both English and French using Polylang plugin and have a different […]

How to link multilanguage products with WP All Import (+Polylang)?

I’m using WP All Import and Polylang to import more than 500 products. However I cannot link products uploaded from my csv/xlsx file. The structure of file looks like this: ID; Name; Description; Price; Language; 1; Product A; Description Product A; 5; en; 2; Продукт А; Описание Продукта А; 5; ru; In “edit import” page, […]

Remove Category slug from link

I’am using Polylang in my wordpress site, so I have too language en and fr. I set en as a default languge. And I create a category named organized-trips in en and voyages-organises in fr. But when I go tho this link I can see all the post, but in the french link […]

Polylang: pll_e() & pll__() on functions.php, doesn't work

I’ve on functions.php some functions that echoes blocks of HTML. Problem comes with Polylang plugin, that uses custom functions pll_e() and pll__(). Those works right on index.php on every theme, but doesn’t work right on functions.php, wich basically always returns me the default language strings, even having’em registred on admin side. So those blocks printed […]

How to link 2 categories (Sync)

I want that whenever a user post something in category “Foo”, the same content must be duplicated to the category “Bar” automatically. Is there such a plugin that automate the process? Or some PHP snippet? I have many categories. Those categories are not the normal WordPress categories, they are custom, for a specific theme, like […]