New answers tagged

2

You need to use the function pll_the_languages() to get the language switcher. It has a bunch of arguments which you can use to customise the language switcher: $args is an optional array parameter. Options are: ‘dropdown’ => displays a list if set to 0, a dropdown list if set to 1 (default: 0) ‘show_names’ => displays language names if set to 1 ...


2

You should hook with the locale filter: add_filter('locale', 'my_get_locale'); function my_get_locale($locale) { if ( is_page( 2846) ) { return "en_GB"; } return $locale; }


0

I found the solution by using this plugin: Global Content Blocks I defined the links in Content Blocks. Then, all languages have the same shortcode pointing to a block. So, I only need to update the Content Block and the update propagates to all languages.



Top 50 recent answers are included