Hi there,
I have a question regarding the shortcode usage.
What I would like to accomplish is to use a shortcode within a page to show events featuring a certain value in a certain custom field key.
Example:
Customfield key = Customer
Customfield value = JohnSmith
I could imagine that very shortcode looking something like this:
[eo_events event_customfield_key=”Custom1″ event_customfield_value=”JohnSmith”]
Would that be possible in some way or another?
Thanks for your kind help!
Linus
Hi Linus,
The event list shortcode passes all the attributes to eo_get_events()
(itself a wrapper for get_posts()
). While I’ve not tested it, in theory the following should work:
[eo_events meta_key="Custom1" meta_value="JohnSmith"]
Of course, any more complicated meta queries, or queries involving multiple keys wouldn’t be possible.
Stephen Harris