Tagged: breadcrumbs
I have a client that wants a “splash page” for their first page of the website. While this is easy to create, is it possible to define a different home page for the bread crumbs? The home link takes the user to the “splash page” and not the home page that we’re using.
Hey tsmalling,
Thank you for the inquiry.
We should be able to use the avia_breadcrumbs_trail filter to adjust the home page link in the breadcrumb. Example:
function avia_adjust_breadcrumb($trail) {
$trail[0] = '<a href="https://site.com/new-home" title="My Site" rel="home" class="trail-begin">New Home</a>';
return $trail;
}
add_filter('avia_breadcrumbs_trail', 'avia_adjust_breadcrumb', 50, 1);
Just replace the href attribute value with the actual link to the page.
Best regards,
Ismael
Thanks, Ismael, but something is not quite right. When I add the filter, it hides the breadcrumbs. I double-checked all the quotes to ensure they were copied correctly, but it doesn’t appear.