There are several good plugins that allow one to create custom fields (or indeed one can just add the fields yourself manually!).
The events plugin has no easy way of knowing what custom fields have been created and how they should be displayed. See the bear hunt approach below. Custom fields could be
- images?,
- urls?,
- boolean values where the displayed value is something else – maybe the field name?
- maybe an array – the result of a multi choice select
- an array of non homogenous values…
Add the custom fields to the post content
Ideally the plugin that creates the custom fields also provides a way to add them to the post content, especially if there is special formatting involved (which the events plugin would not know about). This is what the sharing and social media plugins do… add stuff to the post content.
The events plugin applies all shortcodes and filters to the content, so the creating plugins shortcodes or filters should work to includes those custom fields in the post content.
If the plugin you are using does NOT offer a way to add the info, then you could consider a site specific plugin where you add your own filter or shortcode to display the values however you want them displayed.
Add custom fields elsewhere in the events list
If adding the custom fields to the post content is not ok, then you need some advanced php smarts (or my custom services -:) ). The plugin offers a multitude of filters and pluggable functions where you can add code to do your own thing.
Not recommended unless your needs are truly not satisfiable in other ways: You could even write your own listing function – receive the list of events, including post id’s and list it all anyway you want, looking up any additional data.
Reinvent the wheel
An option being considered is ‘reinventing the wheel’ – basically adding own feature to add custom fields. At least then this plugin would know what the fields are and how they should be formatted. This may be available in a future.
Integrate?
Another option is to pick ‘best of breed’ and deep integrate with an existing plugin. This would put the events plugin at the mercy of change and updates to the other plugin and doesn’t get around the problem that some users will want to use other plugins anyway.
Still thinking about this one.
The difficult way… I’m not afraid…

There is a ‘difficult’ way that the events plugin could offer these other fields to you to design where you want them in the events list. I call it ‘going on a bear hunt’ and have done this in the amr-users plugin for user reporting. It has a lot of overhead both in admin settings and run time.
“There is no way around it, gotta go through it” – the entire meta table would have to be searched through to find all the fields that could exist for a post type. It can only find what data is already created. It still has no way of knowing how they should be formatted. In the wordpress user reporting plugin it does a best guess and offers some options.
The events plugin may do something similar in the future, note it is not a small task.
If you’d like to have a say on this, either comment here, or add a feature request note in the forum.



Hi anmari, thanks for putting this together.
Can you please explain “Ideally the plugin that creates the custom fields also provides a way to add them to the post content” further? Do you mean adding it to “the_content()”?
Because the list items can find the correct url and thumbnail for the post, I guess you are passing a long the id of the post in the list. Would it not be possible to some how get the correct meta value by defining the custom field key?
Another approach is defining your own custom fields in your plugin. How ever as you said, this is reinventing the wheel. And like the idea of plugging amrevents on top of existing post type and data.
I’ve been at this at weeks with custom fields, finally gave in and bought amrevents instead. It’s almost there, although i feel limited due to the fact that I would like to be able to control the output more as I would in i standard WP-loop.
Hi zamson
re
yes – either a shortcode where you determine where the data should go within the content
or a filter which adds it automatically, usually to the end.
For example: with the eventinfo, you can chose to have the plugin add the eventinfo to the single post/event view either before/after content or you can chose to do it yourself selectively using a shortcode.
Yes id is available.
Yes a solution for some would be a simple field entry – just allow user to add custom field names and display them if they exist (or maybe check for a defined format function to handle booleans and arrays – eg: function aical_format_$customfield. Would do the trick for simple situations at least. Noted on the list for future upgrade.
Re output control:
There is actually a LOT of control (style of html, field positions before/after text etc ) before resorting to coding, but if you really want to you can code your own listing as noted above by ‘plugging’ the function amr_list_events
See the following posts:
http://icalevents.com/documentation/templates/
http://icalevents.com/documentation/list-types/
http://icalevents.com/documentation/html-list-styles/
http://icalevents.com/3343-events-plugin-with-pluggable-functions/