Support » Plugin: MultilingualPress » link flags address on home pages not working

  • Resolved johnnyRing


    I’ve got wordpress multisite 3.5
    I’ve inserted code function og Multilingual Press in my header php
    by adding
    <?php echo mlp_show_linked_elements( array( ‘link_text’ => ‘flag’, ‘show_current_blog’ => TRUE ) ); ?>
    The links translations of all pages and posts go very well, but concerning the home pages they do not work.
    The result is something like that
    No Results Found
    The page you requested could not be found. Try refining your search, or use the navigation above to locate the post.
    But I see the “home link menu in the page and if a click on it send me on the right home page

    Someone can help me, please?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Robert Windisch


    Hi johnnyRing,

    can you show me a link to your page, that I can see the problem. It could be that your home page is different than normal homepages.



    i have the same Issue, till few day ago it works right!

    Now the flags in both “home”, eng and ita, link to a not existing pages, i tried to find where it take this but i didn’t find a solution.

    Here you are the link:

    Thread Starter johnnyRing


    I solved by now by using a redirect 301 in htaccess file, but I don’t think is the better solution. More, I’ve others pages like home, in sense that there I can’t edit through multilingual press different languages by the control panel.
    I’ve also changed the function code from
    <?php echo mlp_show_linked_elements( array( ‘link_text’ => ‘flag’, ‘show_current_blog‘ => TRUE ) ); ?>
    <?php echo mlp_show_linked_elements( array( ‘link_text’ => ‘flag’, ‘show_current_page‘ => TRUE ) ); ?>
    but later I didn’t any control about effects
    My urls are
    Tell me if I must change redirect in htaccess file so that you can test my installation plugin.

    Thanks a lot 🙂

    Thread Starter johnnyRing


    Hi Robert,
    it seems to me that the plugin goes on to give problems.
    Today I’ve noticed a very strange thing. As you know I’m building a multilingual site. I’ve to stored in many works of an architecture company, so I’ve created a page that index all projects made where every item is linked to a new page. When I link the selected item to its particular page in italian and fr4ench site all goes well, but when I link the english version the url became this so i get a 404 page
    instead it should be

    the same happoens with

    can you help me to understand the origin of the problem, please? I cannot go on to use redirect 301 for so many items link


    About the problem with the “home-links” i have some new indication, it creates everytime a new wrong link using the last post edited.

    In my italian home the english flag take the link below
    and in my english home the italian flag take the following link

    In the while i’m using the “404 Redirected” Plugin for redirect automatically the 404 error page to the respective home.

    Hope it’s an helpful indication for solve as soon as possible this bug!

    You can use the ‘mlp_linked_element_link‘ hook to get this fixed

    function yourtheme_lang_link($link,$language_blog,$linked_elements) {
      if(is_home())  $link = get_site_url( $language_blog );
      return $link;

    The above solution doesn’t work completely yet, it always redirects me back to the home (but does switch languages which works now).

    please see (http://www)

    -How can I fix the homepage bug but keep the switching on a specific page working?

    The above solution always redirects me to my home. (but switches language)

    Thanks in advance!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘link flags address on home pages not working’ is closed to new replies.