polylang | WordPress multilingual plugin | Content Management System library
kandi X-RAY | polylang Summary
kandi X-RAY | polylang Summary
WordPress multilingual plugin
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Get calendar
- Get the post translation url .
- Check if the url is canonicalized .
- Handles adding language actions .
- Get the form field .
- Handles a language choice .
- Show update notification .
- Count posts .
- Uninstalls this module
- Rewrite rules .
polylang Key Features
polylang Examples and Code Snippets
Community Discussions
Trending Discussions on polylang
QUESTION
I just launched my store on wordpress and I ran into a problem: When I am on the home page of the site, all my product titles are in H2 and should be in h3 (SEO reasons), my recommendation products are also in h2 instead of h3 (on the single product page and in collections, i would like to change them all to h3). I looked for a long time where the problem could come from, searched all the files of the theme to change any title from h2 to h3 but nothing helped, I can't find where it is! I also asked the theme creators for help but they told me it was woocomerce's fault and there was nothing they could do ..
A lot of people have had some of the same problem under other themes but they don't have the same "function.php" as me. I also followed this: How can I change the product
in Woocommerce Storefront to ? but it didn't work for me.Can someone help me on this problem ?
here is my "function.php" but i dont think it'll help..
...ANSWER
Answered 2021-May-19 at 21:08I don't think the functions.php
file has anything to do with it - usually HTML structures like this are created in template php files which are in the themes folder - either on the top level of that folder or as "template parts" in an according subfolder. You have to edit those( or actually those among them that are used by the pages you are referring to), changing all
(also the closing tags).
However, since any not-selfmade theme will be updated every now and then, those changes would be overwritten with updated files when available, it would be necessary to create a child theme, which only contains those templates which you want to change (see also https://developer.wordpress.org/themes/advanced-topics/child-themes/). Then again, updated themes might contain template updates which are necessary, so you'd always have to check which details were updated in that particular template file, integrating it into your child theme templates or editing the updated original themes and using them in your child theme.
P.S.: I think the title of your question is a bit misleading: In the question text you are asking about certain title tags in the product pages, not about parts of the menu, aren't you?
QUESTION
I'm trying to update an old link for a specific language in a very big site that is based on wordpress + polylang, I'm using this query
MYSQL
...ANSWER
Answered 2021-Apr-07 at 17:07you have to be patient.. substantially the subquery returns a table not a string useful to the IN operator, so even if conceptually it is right we have to think differently. Using INNER JOIN I treat the result of the subquery as a useful table for the JOIN itself, so this is the solution for search and replace values in a db based on a wordpress polylang multilanguage site:
MYSQL:
QUESTION
I am trying to change the values of the strings in the Woo Minicart plugin https://wordpress.org/support/plugin/woo-minicart/ for different languages using pll_current_language() of Polylang, but I have some trouble with Polylang and the Woo Minicart plugin. I will attach a video, because the strings change for a second, then get back to the other language. Also, the different links for the different cart pages of the languages, also do not change. Here is how it looks on the frontend: https://www.youtube.com/watch?v=tYFX34ARhF0&feature=youtu.be I just want the strings and the links to be changed according the two different languages, please help. Here is the code that I put in wmc-default-fragment.php and wmc-default-template.php:
...ANSWER
Answered 2021-Feb-16 at 00:27after taking a brief look at the Polylang documentation, I found out about 'pll_language_defined', which executes after all the other functions. Look at it here: https://polylang.pro/doc/developpers-how-to/
When Polylang does load the language? There are two cases: The language is set from the content: Polylang needs to defer the language loading and does it in a function hooked to the action 'wp' action with priority 5. The language code is added to all urls (default): there is no need to defer the language loading and it is done as if Polylang were not active. Due to the first case, plugin authors should not attempt to translate strings before the 'wp' action has been fired. Polylang provides a new action 'pll_language_defined' which is fired as soon as the language is defined. It works whatever the option chosen by the user to set the language.
I used pll_language_defined, I added an action inside it.
QUESTION
I'm using polylang plugin to having multi-languages website.
Using WooCommerce with polylang demands duplicating each product for each language, so assuming I have Hebrew and English, that means 2 duplications for each products.
It works fine with Woocommerce plugin, but when I'm displaying "related products" on the end of product page, its mixing products in English and Hebrew together.
I expect to filter the related product by website current language (if(get_locale() == 'en_US')
- to check website current locale state, else will represent Hebrew).
Here is what I have tried, but I got stuck on the part of filtering the product by language:
...ANSWER
Answered 2021-Feb-09 at 21:19You can try this code:
QUESTION
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 have changed the "name" of the Add to cart button with this code in functions.php:
...ANSWER
Answered 2021-Jan-27 at 21:27You can try with this function:
QUESTION
How to create a custom polylang language switcher like this https://prnt.sc/vnj7b3 ? Html markup to be used : Parent :
...ANSWER
Answered 2020-Nov-22 at 23:09you can get the raw data like so:
QUESTION
My goal
I want to be able to send a request like this https://myblog.com/wp-json/wp/v2/categories?language=4
to get only the categories that are assigned to my language with the ID 4.
What I have tried
I have already added the code mentioned by @mastababa
here.
So now I am able to call https://myblog.com/wp-json/wp/v2/language
to get all languages defined by me via the plugin Polylang and after that I can call https://myblog.com/wp-json/wp/v2/posts?language=4
to get all posts only for the language with the ID 4.
I am using Wordpress 5.5.1 and Polylang 2.8.3
Thanks for your help!
...ANSWER
Answered 2020-Oct-28 at 14:06I think by default you need Polylang Pro to be able to do that. See docs: https://polylang.pro/doc/rest-api/ Then you can call API like this: https://myblog.com/wp-json/wp/v2/categories?lang=en
QUESTION
I'm trying to change default button text "add to basket" in WooCommerce, in loop and in product page, using text field in customizer / Kirki:
...ANSWER
Answered 2020-Oct-22 at 14:06Instead of "pll_e" should be "pll_", so problem solved :)
QUESTION
ANSWER
Answered 2020-Oct-04 at 14:01The answer came from the Polylang! I need to unsychronize the Custom Product Attributes.
The developper need to use the pllwc_copy_post_metas filter. It will allow you to uncopied and unsynchronized the product_attribute and attribute metas. Be careful because these 2 metas included custom and global attributes. That's mean the developper must target only the custom attributes inside this filter (that's required to get a fair knownledge of WooCommerce).
The pllwc_copy_post_metas filter is documented in polylang-wc/include/product-language-cpt.php
The developper may need to unhook the 3 actions in polylang-wc/products.php at line 30-33 to allow you to have global attributes in one language and custom product attributes in another.
QUESTION
I'm using WPML and his switcher to change the languages of the site. Everything works fine so far except the active language flag isn't changed to show the current language.
This is the code I've written so far. It is just always showing the first flag and doesn't change it to active one.
...ANSWER
Answered 2020-Sep-09 at 11:47According to WPML's official documentation, the icl_get_languages()
function returns an array of languages having the following format:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install polylang
PHP requires the Visual C runtime (CRT). The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable for all these PHP versions, see visualstudio.microsoft.com. You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds. The CRT installer supports the /quiet and /norestart command-line switches, so you can also script it.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page