I switch the switch to the header shortcod:

function sn_polylang_langswitcher() { global $post; $output = ''; if ( function_exists( 'pll_the_languages' ) ) { $args = [ 'show_flags' => 0, 'show_names' => 1, 'hide_if_empty' => 0, 'echo' => 0, 'post_id' => $post->ID, ]; $output = '<ul class="langs_selector">'.pll_the_languages( $args ). '</ul>'; } return $output; } add_shortcode( 'cvk_polylang_switcher', 'sn_polylang_langswitcher' ); 

Everything seems to be ok, I switched the language changed (the templates changed, etc.). But when I am on the page of the post, instead of throwing me on him the same English. (English version is) it sends to the main.

How to make the transfer to the same English?

    0