• I am using the qtranslate for a multilingual blog. It is working fine with Breadcrumb NavXT except when it comes to the home link. The home link links always (not matter what language is active) to the home page of the default language.

    But the home link of the german version should link to german home page and the italian version to the italian home page. Both lead now to the english home page since english is the default language.

    Within the navigation menu I have resolved that problem by using

    <a href="<?php echo qtrans_convertURL(get_settings('home')); ?>"> <?php _e('Home','MyTheme'); ?></a>

    How can I do this with the Breadcrumb NavXT plugin?

    Thanks a lot for your help in advance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I’m going to guess that what you mean is that it is not adding in the /de/, appending the ?lang=de, or using de.yourblogdomain.TLD for the home link. Does the title for the link translate correctly?

    Since you had to use the qtrans_conterURL function for the DB call to get the home URL before, any similar calls within Breadcrumb NavXT may need to be overloaded to do that as well (such call exists as get_settings('home') in the do_home and do_front_page member functions of bcn_breadcrumb_trail). The preferable solution is if qtranslate used a filter that worked in this instance, I realize that this may not be possible, or is prohibitively difficult. The other solution is creating a derived class of bcn_breadcrumb_trail and override the do_home function.

    I would recommend against modifying the actual Breadcrumb NavXT files as these changes will be lost when you upgrade to a newer version.

    Also, I should let you know that get_settings('home') should not be used as get_settings is depreciated, instead use get_option('home'), this is outside the scope of Breadcrumb NavXT but will save you headaches in the future.

    I think I have a solution for that! It’s not the prettiest one but at least it’s quite easy and it doesn’t involves changing plugins codes, making their updates so tough.

    What I did was that I created a new category named “Home”, for instance, with the exactly same content as what would be the “original” home (the Index). Than I have set the other categories (services and contact, for example) as childs of that recently created category “Home”. Last but not least, I set the Breadcrumb NavXT to not show the original “Home” (my Index) in it’s options. Also, don’t forget to place a noindex,nofollow attribute on the recently created Home category page meta, just to be sure it won’t be indexed as duplicated content by the search robots. You can use the Robots Meta Plugin for that.

    If you do that, BNXT you show the Home link, but it won’t redirect to the Index and it’s default language, but rather to the Home Page (as a parent category) of the currently selected language. For the website’s visitor the experience is pretty much the same and they won’t even notice what happened.

    Off course there’s a lot of things you may want to refine latter for it to work and look exactly the way you expect (permalinks, for example), but doing just that is already a good way of having qtranslate and BNXT working together with no major problems. Besides, with the attributes on the meta that page is only important for human visitors, which makes things like the Title and the Permalinks a little less important, if not changed.

    Hope I can help someone.

    hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Breadcrumb NavXT] qtranslate and Home link’ is closed to new replies.