WordPress Development Asked by Yevheniy8 on January 9, 2021
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?
You have to set the language for all existing categories and post tags, otherwise they won’t be displayed in the autocomplete input field.
Answered by Urel on January 9, 2021
I'll use as example two pages: Hello
(en) and Bonjour
(fr).
Hello
(doesn't really matter which one)Bonjour
). The input will suggest the other page, just click on it and save, it will link each other.Answered by Dinei on January 9, 2021
pll_save_term_translations Defines which terms are translations of each other Usage:
pll_save_term_translations($arr);
‘$arr’ => (required) associative array of translations with language code as key and term id as value
https://polylang.wordpress.com/documentation/documentation-for-developers/functions-reference/
Answered by Grégoire Sailland on January 9, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP