How can I make it so that my breadcrumb trail only includes the following:
Home/Page Title/Catagory
Can someone assist me with this?
Thank You,
Joe
Hey Joe,
We would be glad to help you with this customization, but at the moment there is no easy way to do this by using a small custom code snippet, so I am afraid it’s out of the scope of our support.
The only thing we could do is to point you to the right direction, you can use a child theme and redefine avia_breadcrumb in functions.php, currently that class is found in enfold > framework > php > class-breadcrumb.php.
Hope this helps.
Best regards,
Nikko
Nikko,
Thank you for your honesty. I appreciate that. Is there a quick way to just shorten the breadcrumbs down to just the first two pages? The challenge I am facing on this site is that the previous developer named a lot of the posts with names like sentences and the owner now doesnt want to shorten them. Just curious if I am fighting a losing battle with the breadcrumbs., Lol.
Thanks for your input, helps a lot! Have a great day!
Joe
Hi Joe,
With 2 pages are you referring from Home/Page Title/Catagory to Home/Page Title ?
If yes, try adding this php code at the bottom of functions.php:
if(!function_exists('avia_cut_breadcrumb'))
{
function avia_cut_breadcrumb($trail)
{
foreach( $trail as $key => $value ) {
if( $key == 0 || $key == 'trail_end' ) {
continue;
}
unset($trail[$key]);
}
return $trail;
}
add_filter('avia_breadcrumbs_trail','avia_cut_breadcrumb');
}
Best regards,
Nikko
Hi Joe,
Well, you can look for a plugin that will allow you more control and flexibility with breadcrumbs.
Best regards,
Victoria