Support » Plugin: MultilingualPress » Language Switcher / Links

  • Resolved Svensson36



    thank you for the great plugin!

    However, I have a problem or maybe it ist just a question. I have a network with two languages (german and english).
    When I am on a page/post in one language and click on the flag to get the page/popst in the corresponding language, everything works fine.

    But when I click on the flag of the language of the current page/post I get to the homepage of the current language (Off course normally you don’t have to click on the button of the current language, but users sometimes do strange things 😉 ). Is this how the plugin behaves normally? I would prefer that nothing happens if I click on the flag of the current language. How can I “teach” the plugin to do so?

    Thanks in advance!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Fuxia



    this should not happen. Are you using the widget or custom code? You can filter mlp_linked_element_link to change that.


    add_filter( 'mlp_linked_element_link', function( $url, $blog ) {
    	return get_current_blog_id() === $blog ? '' : $url;
    }, 10, 2 );


    thanks a lot for the quick answer!

    This solution worked, thank you! To be honest, this is my first multisite installation and I didn’t know that I can use custom code which I normally prefer. So I use the widget.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Language Switcher / Links’ is closed to new replies.