adding past events to list view

Home Forums Calendar Products Events Calendar PRO adding past events to list view

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #210113
    jamminonhaight
    Participant

    i just want to add 10 previous events to the bottom of the list view. with a heading that says “past events”

    #210292
    Barry
    Member

    Hi – interesting idea!

    The best starting place for a customization like this is our Themer’s Guide which covers the basics of safely overriding and customizing our templates. You’re probably also going to want to dig into our tribe_get_events() function (and a solid understanding of how WP_Query works would be an added bonus).

    I wish you luck – let me know how you get on 🙂

    #210294
    jamminonhaight
    Participant

    i looked through this, i still have no idea which php template to even start with.

    #215289
    Barry
    Member

    Well, it sounds like views/list.php would be a good starting place. You might even do this without template overrides by using the tribe_events_after_template hook – that way you could “inject” a new list from your theme’s functions.php file, if that happened to be preferable to working with template overrides:

    add_action( 'tribe_events_after_template', 'custom_past_events_list' );
    
    function custom_past_events_list() {
    	if ( ! tribe_is_upcoming() ) return;
    	$past_list = 'You might call another function which generates this';
    	echo $past_list;
    }

    A great deal depends on what you’re comfortable with, but that’s another avenue you could explore.

    #723272
    Barry
    Member

    Hi! It’s been a while so I’m going to go ahead and close this thread. If we can help with anything else, though, please don’t hesitate to create new threads as needed. Thanks!

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘adding past events to list view’ is closed to new replies.