Support

Home Forums Event Espresso Premium How to show event archive (EE4)

How to show event archive (EE4)

Posted: November 22, 2014 at 10:28 am


Donal

November 22, 2014 at 10:28 am

On the events page (/events), I would like to show upcoming events at the top of the page, but underneath that, I would like to show an archive of all past events. What is the best way to do that?


Dean

November 24, 2014 at 4:50 am

Hi,

/events/ is the archive page, so what you would need to do is create a custom function to display the upcoming events and inject it into the archive.

Here is a very basic example of a custom query that can be used within a custom function: https://gist.github.com/joshfeck/e3c9540cd4ccc734e755

Then you can use the following action hook to insert it if you are using the Event Espresso template files (otherwise you will need to check your themes archive.php to see if there is an action hook you can use):

AHEE__archive_espresso_events_template__before_loop

Here’s some info on using the EE templates. You should be able to get away with just using step one and 2 and then the custom function. https://eventespresso.com/wiki/build-custom-espresso-event-post-templates-genesis/

The support post ‘How to show event archive (EE4)’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso