I have a need to remove specific languages from the Polylang language switched that I don't want to remove or disable, and they're not the current language. There doesn't seem to be an easy way to do this in Polylang's settings
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 using __(): $args = shortcode_atts([ 'link' => 'service', 'text' => __('Get the code now!'), 'title' => __('Code'), 'id' => '', 'class' => 'width300', ], $args, '' ); But I don't know how to translate strings …
I divided the website i am making in diferent template files for example: Category for blog -> category-blog.php Category for projects -> category-projects.php But now I am using the POLYLANG plug in to make the translations. I've noticed that while i am creating the respective category in other languages the template does not apply for example category-blog.php file does not apply to the category-blog.php in other languages. Is any way that i can use the same category template file to …
I used Polylang plugin to translate pages, So url of english page https://www.example.com/protfolio When I translated this page will be https://www.example.com/ar/protfolio-ar So I can't see content of the page because I addedd -ar in slug but polylang can't duplicate slug so How can I show translated content even I added custom slug
I have a website where anyone can post jobs from frontend. The jobs pages are rendered by custom archive and single pages in my custom theme. I want the website to be multi language with switcher. The problem is to translate the static text in archive-job.php and singe-job.php, without translating the content of jobs. I tried polylang, but that one needs multiple posts, one for each language. Which means that I need to duplicate the post content Is there a …
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 .mo files is CodeStyling Localization. The .po and .mo files are situated in the folder /language/ inside my theme. The theme is localized and works …
I am trying to translate the string 'Home' in wordpress that is registered as an esc_html__(). This is the code registering the themes functions.php: if(!function_exists('gem_breadcrumbs')) { function gem_breadcrumbs($new = false) { $text['home'] = esc_html__('Home', 'thegem'); }} /* there many more strings in the function but I only need to translate 'Home' To register the string I am using polylang (but it could be anything not specific to polylang) and the documentation refers to registering a simple string _e() using the …
On a multisite installation, which is running the Polylang plugin, I want to add a custom rewrite rule. Currently, my permalink structure is: http://host.com/sitename/language/pagename Now I want to add a querystring called country, as such: http://host.com/sitename/country/language/pagename I have tried the following, but to no avail: function custom_rewrite_basic() { add_rewrite_tag('%country%', '([^&]+)'); add_rewrite_rule('^([a-z]+)/?', 'index.php?country=$matches[1]', 'top'); } add_action('init', 'custom_rewrite_basic'); Any thoughts? -- EDIT Getting closer, but still not there: add_rewrite_tag('%country%', '([^&]+)'); add_rewrite_tag('%lang%', '([^&]+)'); add_rewrite_rule('^([^/]*)/([^/]*)/?','index.php?country=$matches[1]&lang=$matches[2]','top'); The problem here is that: polylang recognized the country …
On short: I use Polylang plugin for my web but it's option to detect browser language won't work because I need to use cache in the whole site, including the homepage. I have a bilingual website (english and spanish) which handles lots of Custom Post Type and Custom Fields data. This means that I MUST use cache and CDN (like Cloudflare) in order to achieve good speed and performance by serving static files. This is not my field of expertise …
I use ACF to customize taxonomy term archives pages which are in fact Team member pages. Pages are translated with the help of Polylang. Problem is : If the member has no related posts, I can access directly the member page, but the translated page is not linked to the language switcher menu. Instead it has been replaced with a link to translated homepage. I found that this is common behaviour in Polylang. It is programmed to never show translated …
How can I translate with the date output format like this: AUG 2020 with php wp or my wordpress site is currently using the polylang plugin. Please help me, thank you.
I used to have a multilingual website translated with Qtranslate but now I am changing this to Polylang. I had a wp_query (below) that was working fine and when converted to polylang shows that no posts match my criteria <?php $args = array( 'post_type' => 'conversatietafel', 'posts_per_page' => 10, 'category_name' => 'Volwassene', 'public' => True, ); $the_query = new WP_Query( $args ); ?> <?php if ( $the_query->have_posts() ) : ?> <?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?> Categories and …
I'm trying to filter custom taxonomy by language. To achieve this, I use WP_Query class with the following arguments: $args = array( 'post_type' => ['post', 'page'], 'post_status' => 'publish', 'lang' => $language, 'tax_query' => array( array( 'taxonomy' => $taxonomy_custom_category, 'field' => 'name', 'terms' => $taxonomy_term, ), ), ); Where $language is one of the language retrieved by pll_languages_list(). However, except for the language by default, the query results is always empty. Is there any way to build a form with …
I am making an plugin, and inside my admin page (Which i add by add_menu_page() function) i call this function pll_the_languages(["raw" => 1])) but its return nothing,on client side its work fine. I added many languages on Polylang setting page. How can i get Polylang available languages from an admin page ?
I have moved content from one WP (server) to another. I use WooCommerce, Polylang and Hyyan WooCommerce Polylang Integration. I might have done something wrong in the setup. I have a shop page in Swedish, and it's marked as "webshop page" (in swedish it is 'butikssidan') in the listing of pages. It has version in English but - the english version is not marked "webshop page". How can I mark the other webshop page as "webshop page"? I looked in …
Short: In Languages -> Settings -> URL modifications, the options "The language is set from the subdomain name in pretty permalinks" and "The language is set from different domains" are disabled. Why is this and how can I make these boxes selectable? I am particularly interested in the last option (different domains). Versions: Wordpress 5.5.1, Polylang 2.8.3 Background: My goal is a bilingual website (single web site install using polylang). I have two domains domain.aa and domain.bb for the languages …
I have two language versions for each of my pages using Polylang plugin. There's a language switcher on every page. But somehow I created two posts not connected to each other (first two in the list). How can I interconnect them so language switcher works properly?
Currently, I am making a Bilingual website, and I made a button on the header as well, and I want to make the button bilingual as well, but I don't know how could I change its language because it is not part of the menu. I use Polylang and Elementor.
I am working on a website, and I am using Polylang to translate it to a different language. In my code I want to get a page title, and display it. My issue is I cannot get it by ID or page_by_path because its going to display the English version of the page on every language. For example: I want to display the Contact page title on english Contact and on another language its equivalent translated contact page title. Is …