Articles of plugin polylang

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 […]

WP_Query and polylang issue

In the theme I develop, I have a template showing 5 posts using the standard loop: <?php $my_query = new WP_Query(‘showposts=5’); while ($my_query->have_posts()) : $my_query->the_post(); ?> and so on…. There is a page (Actualites) using this template. Now I added polylang and provided another page (News) which uses the same template. There will not be […]

Replicating the WP_Query 's' param with $wpdb

Take this basic query: $posts = new WP_Query(array( ‘post_type’ => ‘page’ ‘s’ => ‘some search query’ )); WordPress will split the some search query into 3 separate search terms, which is why I need to make this $wpdb function. I want the same functionality, but with the entire query treated as 1 search term. Here […]

get_locale() behaving strange in same functions.php file

I’m developing a multi-language web portal for my client – in English and Bengali. Instead of using multisite, I installed Polylang plugin. It’s working fine through the website. For different CSS styles, and different font-sizes I’m loading a separate stylesheet with: function styles_and_scripts(){ wp_register_style( ‘main-style-bangla’, get_template_directory_uri() . ‘/style-bangla.css’, ”, ”, ‘screen’ ); // load seperate […]

WordPress multilingual site using page-id.php files

I’m building a WordPress site which I hope to offer in three languages namely: English Spanish French In the past I’ve always built out my sites by creating the pages via the backend, recording the ids for each page and creating php files with the following naming convention: page-123.php and including get_header() and get_footer. This […]

detect the language a post is written in

Is there any way to evaluate the language a post/page is written in? I am building a multilingual site and am almost pulling my hair out trying to get the front-end navigation to take the chosen language into account. So far the polylang plugin http://wordpress.org/extend/plugins/polylang/ has worked fine for everything else.

create users to site with specific language

We’ve created a website that has 8 languages, Russian, Spanish or English to name a few. Each language has its own version of the website. I’m trying to create users that will be able to only modify the site’s assigned languages. For example, if I create a user for the Russian version, that person will […]

How to show all available images in WP's media library when using the Polylang plugin?

It seems that depending on which default language I’ve set Polylang to, all my uploaded images are isolated so that I can only pick them when I’m editing posts in the default language. I have a lot more images shared/in-common between English and French posts than images specific to a single language. Is there any […]

custom theme: english .mo file not working

I’m having an issue with a .mo file. I have a fully functioning localized custom theme that’s running in four languages for the moment: Dutch, English, French and Spanish. There is one problem: the English localization doesn’t work. The other languages work just fine. The translation plugin is polylang. The plugin for creating .po and […]