Tagged: slug
Hi,
I am creating products, and I am adding them as articles. For these articles, I have created categories, but, when I look at the breadcrumb, I find a slug that does not exist, for example: Home/News/Custom Packaging/Pharmaceutical Sector/Aluminium Secure Wrap. ‘news’ does not exist and I don’t know where to go to delete it. Can you kindly provide me with support?
Looking forward hearing from you.
best regards
MS
Hey maryenvato,
Thank you for the inquiry.
The blog or news page is always included in the breadcrumb by default when viewing a single post, but you can remove it by adding this filter in the functions.php file.
function avia_breadcrumbs_trail_mod($trail)
{
// remove news trail
if ( is_singular( 'post' ) ) {
unset($trail[1]);
}
return $trail;
}
add_filter('avia_breadcrumbs_trail', 'avia_breadcrumbs_trail_mod', 50, 1);
Best regards,
Ismael
Thank you!