Is there a way to add a filter to the espresso_my_events shortcode? I’m hoping to add an attribute that will limit the data returned from the shortcode. I would like to have the following attribute values:
All – lists out all of the events where this user has a registration – could be the default value
Next – Lists out the next event for this user – only returns 1 event (would like to have a banner on an account page reminding the users of their next event)
Upcoming – lists all of their upcoming event registrations
Past or Expired – lists their historical registrations
We have some users with a number of registrations and breaking up their list of events would be extremely helpful. And having the ability to show them their next registration would be great to have.
Please let me know if you have any questions or suggestions.
Is there a way to add a filter to the espresso_my_events shortcode? I’m hoping to add an attribute that will limit the data returned from the shortcode
I did some digging into this and whilst it is not possible to pass custom shortcode attributes within the code, there is a filter available that allows you to change the query args via code.
Take a look at the FHEE__Espresso_My_Events__getTemplateObjects__query_args filter.
I’ll open a discussion on passing the shortcode attributes to that filter which would then allow custom code to hook in and do more based on the attributes, however, I can’t say if it will be included (there may well be a reason its not already available).
Viewing 3 reply threads
The support post ‘Espresso_my_events shortcode filters’ 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.
Support forum for Event Espresso 3 and Event Espresso 4.