Tagged: breadcrumbs, the event calendar
I’ve followed the instructions from “the dude” to get the title working on pages powered by The Events Calendar (https://gist.github.com/InoPlugs/5442030) and it works fine.
Just wondering if anyone has a similar tip to get the breadcrumbs working so that it includes the Events path in the breadcrumbs.
Thanks in advance
Hi scottybowl!
Tbh I didn’t test the code with the latest version of Enfold and Events Calendar on my test server but you can try to insert it into the enfold/functions.php or child theme functions.php file:
if(!function_exists('avia_modify_event_breadcrumb'))
{
function avia_modify_event_breadcrumb($trail)
{
if(get_query_var('post_type') == 'tribe_events')
{
$newtrail = array('<a href="#">Events</a>');
array_unshift($newtrail, $trail[0]);
if(is_single()) $newtrail['trail_end'] = $trail['trail_end'];
$trail = $newtrail;
}
return $trail;
}
add_filter('avia_breadcrumbs_trail','avia_modify_event_breadcrumb');
}
Cheers!
Peter
Thanks! Very helpful :)