Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi,

    Something like this should work:

    [events_list event="YOUR EVENT ID" recurrence="YOUR EVENT ID" scope="future"]

    Thread Starter rossing

    (@rossing)

    That works, but I’m trying to set it up so that any given instance of a recurring event will automatically list all instances of a recurring event in the post. I’m trying to use the post_id attribute as the recurrence, but it’s not working.

    I’m not sure I follow 100% – you mean you want to list the recurring sequence on the event page?

    Thread Starter rossing

    (@rossing)

    Yes, in the single event page for one instance of a recurring event, I would want it to list all of the upcoming instances of the recurring event.

    Plugin Support angelo_nwl

    (@angelo_nwl)

    you can create custom placeholder instead like https://pastebin.com/jT7XcrxK

    *replace location with event

    As for where to paste this : https://wp-events-plugin.com/tutorials/how-to-safely-add-php-code-to-wordpress/

    Thread Starter rossing

    (@rossing)

    Sorry, I’m still having trouble with this. I replaced “location” with event in the code each time, should I have only done it for the first one?

    This is the code I used in the functions.php:

    add_filter('em_location_output_placeholder','my_em_placeholder_mod',1,3);
    function my_em_placeholder_mod($replace, $EM_Location, $result){
            switch( $result ){
            case '#_LOCATIONNEXTEVENTS':
                    $events = EM_Events::get( array('event'=>$EM_event->event_id, 'scope'=>'future', 'limit'=>3) );
                    if ( count($events) > 0 ){
                            $replace = get_option('dbem_location_event_list_item_header_format');
                            foreach($events as $event){
                                    $replace .= $event->output(get_option('dbem_location_event_list_item_format'));
                            }
                            $replace .= get_option('dbem_location_event_list_item_footer_format');
                    } else {
                            $replace = get_option('dbem_location_no_events_message');
                    }
                    break;
            }
            return $replace;
    }

    I’m using shortcode “[events_list] #_LOCATIONNEXTEVENTS [/events_list]”

    Thanks!

    Plugin Support angelo_nwl

    (@angelo_nwl)

    hmm, sorry for the confusion; so, in your single event page you’ve wanted to list other recurring event where this event belongs to?

    eg.

    Recurring event 1-a = currently displayed

    List other recurrence:

    Recurring event 1-b
    Recurring event 1-c
    Recurring event 1-d

    did I get it right?

    Thread Starter rossing

    (@rossing)

    Yes, exactly, sorry for my muddled words!

    [Moderator Note: No bumping, thank you.]

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘List Recurring Events for Said Event’ is closed to new replies.