Tagged: breadcrumbs
No matter which page I am on, the homepage is always shown as the root element. So when going to a site from a submenu, it will say “homepage / page01” instead of “title-of-submenu / page01” or “homepage / title-of-submenu / page01”.
I have been through other related threads but no solution has worked so far. Would highly appreciate any help on this.
Hey ABaumert,
Please try adding this code to the Quick CSS section under Enfold > General Styling or to your child themes style.css file:
.breadcrumb .sep:nth-child(2) {
display: none!important;
}
Then add following code to Functions.php file in Appearance > Editor
add_filter('avia_breadcrumbs_trail', 'avia_change_breadcrumb', 10, 1);
function avia_change_breadcrumb($trail) {
$home = array_shift($trail);
$last = array_pop($trail);
unset($trail);
$trail[0] = $home;
$trail[] = $last;
return $trail;
}
Best regards,
Yigit
Thanks a lot, it is getting better now but not perfect yet ;) Now it will always only show the site I am on as Breadcrumb but not the parent site. Once It is “parentsite / current site” it will be perfect. Kindly let me know how to achieve that.