• Resolved Graham

    (@sandgroper)


    I must be missing something. I can get the Events page to show all, past or only future events, but I can’t get that to work within the group page in BuddyPress.

    The table only shows currently active events.

    How do you get the actual group page to show past events in the table as well?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    did you already tried under Events > Settings > Pages > Event List/Archives > Default event list options > Event list scope

    Thread Starter Graham

    (@sandgroper)

    @angelo_nwl

    I was changing the scope in the next section down “Default event list options”.

    Just tried it in the Archives scope box and it had no effect on the Events page.

    The explanation about colliding entries has always confused me. I have two test events that have the same name, but the event slug added -2 to the second one.

    Maybe I need to change the actual event name too. Will play around and see what happens.

    Thread Starter Graham

    (@sandgroper)

    Changing the event name for each event had no effect. I can search for past events by using a date range and the past event will come up, but is not displayed by default.

    I selected not to use the Events page and that works, buy you have to be logged in to see events.

    In either case, the group page still only shows the future event.

    I am totally out of my depth here. I don’t know how Events Manager and BuddyPress talk to each other, so I don’t know what to set to what.

    There doesn’t seem to be anywhere to select what group pages will show.

    Thread Starter Graham

    (@sandgroper)

    Okay, I changed the end date of my past event to the future and it appeared in both the Events page and the Group page.

    So the problem is only one problem – why are past events not showing?

    There’s probably a simple reason, but I can’t see it.

    By default the group events pages only shows future events. If you want it to show past events as well, you’ll need to make an edit to this file:

    /events-manager/templates/buddypress/group-events.php

    Change line 9 from this

    $EM_Events = EM_Events::get( array('group'=>'this','scope'=>'<strong>future</strong>', 'limit' => 0, 'order' => $order) );

    this

    $EM_Events = EM_Events::get( array('group'=>'this','scope'=>'<strong>all</strong>', 'limit' => 0, 'order' => $order) );

    This tutorial explains how to create custom templates that are upgrade-safe:

    https://wp-events-plugin.com/documentation/using-template-files/

    Sorry, that code didn’t come out as it should have.

    This is the line you need to look for (line 9):

    $EM_Events = EM_Events::get( array('group'=>'this','scope'=>'future', 'limit' => 0, 'order' => $order) );

    It should be chnaged to this:

    
    	$EM_Events = EM_Events::get( array('group'=>'this','scope'=>'all', 'limit' => 0, 'order' => $order) );

    In other words, change future to all.

    • This reply was modified 7 years, 3 months ago by caimin_nwl.
    Thread Starter Graham

    (@sandgroper)

    @caimin_nwl

    Thanks. I will take a look when I have time later.

    I did manage to get a workaround using a shortcode on the Events page:

    [events_list scope=’past’ limit=10 pagination=1 ][/events_list]

    But that doesn’t show them in the group.

    Thread Starter Graham

    (@sandgroper)

    @caimin_nwl

    Thanks. Worked like a charm.

    Created the buddypress template folder in my child theme, by following your link, and copied that file into it. Then changed “future” to “all” and sort order from “ASC” to “DESC” in the code just above yours.

    Now group admins can keep or delete old events as they see fit.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Past events on group page’ is closed to new replies.