WordPress.org

Ready to get started?Download WordPress

Forums

Multilingual Press
[resolved] link flags address on home pages not working (8 posts)

  1. johnnyRing
    Member
    Posted 1 year ago #

    Hi,
    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?

    http://wordpress.org/extend/plugins/multilingual-press/

  2. Robert Windisch
    Member
    Plugin Author

    Posted 1 year ago #

    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.

    regards,
    Robert

  3. lucaweb
    Member
    Posted 1 year ago #

    Hi,

    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: http://www.cealift.it

  4. johnnyRing
    Member
    Posted 1 year ago #

    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 ) ); ?>
    to
    <?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
    http://b5srl.eu
    http://en.b5srl.eu
    http://fr.b5srl.eu
    Tell me if I must change redirect in htaccess file so that you can test my installation plugin.

    Thanks a lot :-)

  5. johnnyRing
    Member
    Posted 1 year ago #

    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
    http://en.b5srl.eu/university-pole-folcara-cassino-frosinone%E2%80%8E/ so i get a 404 page
    instead it should be
    http://en.b5srl.eu/university-pole-folcara-cassino-frosinone

    the same happoens with
    http://en.b5srl.eu/monte-santangelo-brace%E2%80%8E/
    http://en.b5srl.eu/monte-santangelo-brace

    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

    thanks
    j.

  6. lucaweb
    Member
    Posted 1 year ago #

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

    Exemple:
    In my italian home the english flag take the link below
    http://www.cealift.it/en/last-italian-post-edited
    and in my english home the italian flag take the following link
    http://www.cealift.it/last-english-post-edited

    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!

  7. gvancout
    Member
    Posted 1 year ago #

    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;
    }
    add_filter('mlp_linked_element_link','yourtheme_lang_link',10,3);
  8. pbosch
    Member
    Posted 1 year ago #

    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) capegroep.nl/category/systems-integration/

    -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!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.