Category Dropdown

This topic contains 1 reply, has 2 voices, and was last updated by  Stephen Harris 11 years, 2 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #7580

    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
    #7583

    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
Viewing 2 posts - 1 through 2 (of 2 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.