Tagged: Blog, breadcrumbs, categories
Hi support,
Is it possible to remove “blog” from the breadcrumbs on posts?
On this post, I would like the breadcrumbs to be – Your are here: Forside / Branche / Digital / Webbureau / OKEI.dk – just like the url.
https://wordpressindex.dk/branche/digital/webbureau/okei-dk/
Is there a way to extend the numbers of categories in the breadcrumbs?
Thanks :-)
/OKEI
Hey OKEI,
Thank you for using Enfold.
Use this filter to remove the first breadcrumb trail or the “blog” part.
add_filter( 'avia_breadcrumbs_trail', 'avia_breadcrumbs_trail_mod', 50, 2 );
function avia_breadcrumbs_trail_mod( $trail, $args )
{
if ( is_single() )
{
unset($trail[1]);
}
return $trail;
}
Best regards,
Ismael
Thanks, Ismael :-)
Works wonderfully, but only on the frontpage. Is there a way to make it work on all pages?
Is there a way to extend the numbers of categories in the breadcrumbs?
Thx.
OKEI
Hi,
Thanks for the update.
That filter is supposed to remove the first trail “blog” on post pages. The first trail is not displaying when I checked the above post.
Unfortunately, you can’t add multiple categories to the trail. Only the first category will display.
Best regards,
Ismael
How can I remove “blog” from other pages and archives?
https://wordpressindex.dk/branche/digital/webbureau/
Thanks :-)
Hi,
You have to remove the conditional function is_single.
add_filter( 'avia_breadcrumbs_trail', 'avia_breadcrumbs_trail_mod', 50, 2 );
function avia_breadcrumbs_trail_mod( $trail, $args )
{
unset($trail[1]);
return $trail;
}
Best regards,
Ismael
YES – thank you very much!! ;-)
Everything works fine now.
Please close.
Best regards,
OKEI