Breadcrumbs and theme conflicts
-
Hello and congrats on the great plugin, tried several event plugins and this one has the best recurring functionality, while also being very customizable.
I’m running my own custom theme and it features several loops on the frontpage. Whenever I enter a location i.e localhost/location/MyCity, on a few of those loops an error shows up above them:
Warning: Attempt to read property “location_label” on null in E:\Server\htdocs\wp-content\plugins\my-calendar\my-calendar-locations.php on line 1325
The line in question is part of if is singular ‘mc location’:
'lvalue' => $location->location_label,I do not know how to fix this, so currently I have just disabled all links leading to the location pages. My other issue is with breadcrumbs. Whenever I visit a single event or location, breadcrumbs go Your City -> -> Single Event, instead of Your City -> Events -> Single Event, is this fixable? My code:
function get_breadcrumb() { echo '<a href="'.home_url().'" rel="nofollow">My City</a>'; if (is_category() || is_single()) { echo " -ยป "; the_category(' • '); if (is_single()) { echo " -ยป "; the_title(); } } elseif (is_page()) { echo " -ยป "; echo the_title(); } elseif (is_search()) { echo " » Search Results for... "; echo '"<em>'; echo the_search_query(); echo '</em>"'; } }Thank you for this plugin!
The topic ‘Breadcrumbs and theme conflicts’ is closed to new replies.