Event Organiser
[resolved] Go directly to event (8 posts)

  1. Cesar_F
    Posted 3 years ago #


    Is it possible go directly to an event when I click on a day in the calendar?

    Now, when I click appears "blog archive" and a list of the events (only a event per day),
    buy I want open directly the event, with the map....etc



  2. Stephen Harris
    Posted 3 years ago #

    Yes - see this thread for an example

  3. Stephen Harris
    Posted 3 years ago #

    Ah wait - wrong calendar :). So the answer is yes - but only in 1.6 (currently in Beta). See this thread instead :)

  4. tunixtunix
    Posted 3 years ago #

    I'd be VERRRY interested in that feature, too :-)

    Will it be possible to jump directly to an event from a specific category, even though there are other events on that date in a different category?

    You know, I'm the one how uses your plugin for short stories. I have 5 of them each day. I also want to include a "daily tip", so I'd make another category "tipps" with only one event every day (with yearly repeat) and jump from the submenu directly to the tip, instead of a list with only one entry.

    Would that be possible? When will you release 1.6?

    thank you so much!

  5. Stephen Harris
    Posted 3 years ago #

    Certain will. Let's suppose we want to link to a category page - and, if present, we want 'tipps' to be used. (We'll also link to the category page, but filter by events starting that are 'running' that day using the ondate parameter)

    add_filter('eventorganiser_widget_calendar_date_link', 'tunixtunix_link_to_event_cat',10,3);
    function amen_link_straight_to_event( $link, $date, $events ){
           //Note $date is a datetime object corresponding to a day in the widget calendar
           //Sanity check
           if( !$events )
               return $link;
           //Let's get all the event terms:
           $event_cats = array();
           foreach( $events as $event ){
              $terms = get_the_terms( $event->ID, 'event-category' );
              if( $terms)
                 $events_cats += $terms;
           //If not event categories, abort
           if( !$event_cats )
              return $link;
           //Extract the term slugs
           $event_slugs = wp_list_pluck( $event_cats, 'term' );
           if( in_array('tipps', $event_slug ) ){
               $slug = 'tipps';
               //Tipps not present, just pick another category
               $slug = array_pop( $event_slugs )
            //Get link to that category, and append 'ondate'
           $link = add_query_arg('ondate',$date->format('Y-m-d', get_term_link( $slug, 'event-category' );
            return $link;

    **Note:** This is not tested, but should work in principle. It will only work for **1.6** or above which is currently in beta. I'm not plaining on releasing this until after WP 3.5 (which is due to be out 5th December). You can expect it shortly after - but I'd like to do some more bug tests :)

  6. Stephen Harris
    Posted 3 years ago #

    The code above is a bit buggy - I've not tested it, but I can see some syntax errors. I've made this gist: https://gist.github.com/4133300

  7. Stephen Harris
    Posted 3 years ago #

    1.6 was released earlier today so the above filter is available. You can find out more here: http://wp-event-organiser.com/blog/1-6-released/

  8. tunixtunix
    Posted 3 years ago #

    Thank you Stephen - I'll give it a try

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Event Organiser
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.