Is it possible to show breadcrumbs on category displays only?
Hey wacky32,
You can use css to hide them on all other pages or the individual blog page, if I’m understanding you correctly.
Best regards,
Jordan Shannon
Hi Jordan,
I’d like to hide them everywhere, except for top level category pages.
I know I can manually turn them off/on in each individual page/post, but I’m trying to make this change after a few hundred pieces of content have already been created. Hoping there’s an existing solution for css code fix.
Thanks!
Hi,
Thank you for the update. Use this filter to enable the breadcrumb on category or archive pages only.
// enable breadcrumb on archive pages only
add_filter( 'avia_breadcrumbs_trail', 'avia_breadcrumbs_trail_mod', 20, 2 );
function avia_breadcrumbs_trail_mod( $trail, $args ) {
if( !is_archive() ) {
unset($trail);
}
return $trail;
}
Best regards,
Ismael