On the full calendar page, I’d like a dropdown menu item at the top which allows the viewer to select a specific category.
In fact, how do you view a calendar with just one selected category? I tried “/calendar/category/sports” And I got a 404 page.
If I click on a category in a single-event I get a listview and not a calendar.
Dave Navarro
Hi Dave,
If you wanted to display a drop-down so the user can select a category to view you can use:
[eo_fullcalendar headerRight="category"]
(or headerLeft
, headerCenter
depending on where you want to the drop-down to appear. If you wanted to display a calendar with just one category you can use
[eo_fullcalendar category="foobar"]
(shortcode docs: http://wp-event-organiser.com/documentation/shortcodes/event-full-calendar-short-code/)
If however you wanted a calendar to appear on the top of your category page (events/category/foobar
) you can use the following a template:
//This will only work on the category template(`taxonomy-event-category.php`)
$category = get_queried_object();
eo_get_event_fullcalendar( array(
'category' => $category->slug,
) );
(Function reference: http://codex.wp-event-organiser.com/function-eo_get_event_fullcalendar.html)
Stephen Harris