Posted: September 30, 2021 at 7:17 am
|
Hi. Can you please help me with this problem? |
Hi there, We have a filter on the query used to pull the objects in for the My Events section so rather than doing the above (which is after the add-on has pulled the events) I recommend using the You can see an example of that filter in use here: https://gist.github.com/Pebblo/334ba1f465a367fe9fd14749b9c8dede To only use events from a specific category, you’ll need something like:
Where 999 is the ID of your ‘seminar’ category and you would use that in place of line 20 of that snippet. You can add that to a custom functions plugin on your site, we have some documentation on creating one here: https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/ |
|
|
Tony Thanks for your support! Can you show 2 or more categories separately with [ESPRESSO_MY_EVENTS]? <Seminar> <Event> I really appreciate your support. |
We don’t have an option to do that within the add-on and if that’s what you are trying to achieve then the above snippet I gave you for your original question won’t work as it limits the events returned from the query to a specific category. You’ll need to look into how This isn’t something I can walk you through but if you are comfortable with PHP you can take a look at our model system here: https://github.com/eventespresso/event-espresso-core/tree/master/docs/G–Model-System Which makes pulling in various EE data relatively simple. |
|
The support post ‘Filter events in [ESPRESSO_MY_EVENTS]’ 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.