My website is https://lightenthedark.com. When clicking on a blog post, there is a navigation thread right under the site header that lists: home>blog>[title]. Is there any way to get rid of the blog link and just have the home page and then the article page? When it comes up in search results it also lists “blog” before the actual title and I would love it if it’d just go from home>title.
Hi Courtney,
Thanks for reaching out.
To remove the Blog from the breadcrumb in the Post Details page you need to add the following code into your Child Theme’s functions.php file.
add_filter('x_breadcrumbs_data', 'post_parent_trail', 9999999, 2);
function post_parent_trail ($crumbs, $args)
{
if ( is_singular('post') )
{
unset($crumbs[1]);
}
return $crumbs;
}
Please remember that the above code will work if copied as it is and doesn’t conflict with any existing style.
Please note that the code provided serves only as a guide to help you get started custom coding on your own if there’s no option offered in our theme or the products we bundle.
We really do not provide support for custom codes that means we can’t fix it in case it conflicts with something on your site nor will we enhance it.
Thanks
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.