Breadcrumb NavXT
Home title is not changed when language changes (3 posts)

  1. blatan
    Posted 4 years ago #

    I have Polylang plugin for multilingual website.
    When I switch the language my home page title changes.
    shows the title in current language, but I can't configure the breadcrumb to shows it.
    I tried hacking the plugin, but I know it isn't good idea.
    I put the front page title to table opt before line 506 of breadcrumb_navxt_class.php:

    $this->opt['Shome_title'] = get_the_title(get_option('page_on_front'));
    $breadcrumb = $this->add(new bcn_breadcrumb(get_the_title($id), $this->opt['Hpost_' . $parent->post_type . '_template'], array($parent->post_type), get_permalink($id)));

    Could I ask you to tell me how I should do it in a good way?


  2. John Havlik
    Plugin Author

    Posted 4 years ago #

    I think in the next version I'm going to drop the additional title settings except for "Home title" on a non-static frontpage setup. That will fix the issue you are seeing.

  3. blatan
    Posted 4 years ago #

    Thank you for that.
    For now I've got a better idea than hard code in your class.
    I've used jquery after the div display the trail.

    <script language="JavaScript">
    if($('html').attr('lang') == "en-US" ) $('#pageFooterLinks div.breadcrumbs a:contains("strona glowna")').text('home');

    where "strona glowna" is the Polish title of "home"

    I hope it will help someone who has the same problem.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Breadcrumb NavXT
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic