blatan
Member
Posted 11 months ago #
Hello,
I have Polylang plugin for multilingual website.
When I switch the language my home page title changes.
Function
get_option('page_on_front'));
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?
http://wordpress.org/extend/plugins/breadcrumb-navxt/
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.
blatan
Member
Posted 11 months 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">
//alert($('html').attr('lang'));
if($('html').attr('lang') == "en-US" ) $('#pageFooterLinks div.breadcrumbs a:contains("strona glowna")').text('home');
</script>
where "strona glowna" is the Polish title of "home"
I hope it will help someone who has the same problem.