Adding Custom Fields

This topic contains 7 replies, has 3 voices, and was last updated by  bhasic 11 years ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #5120

    How easy is it to add custom fields like COST, GENRE, HEADLINE ACT, SUPPORT ACT.. etc to the event-organiser-edit.php? eg in the _eventorganiser_author_meta_box_title area?

    ryan
    #5234

    Currently there is no API available that allows you to do this without editing the core files. However, events are just a post type so you can still use custom fields, or register your own metabox

    Stephen Harris
    #5333

    I added custom fields with a wordpress custom field plugin, then adding php echo get_post_meta(get_the_ID(), ‘field’, 1 ); to template like in http://codex.wordpress.org/Function_Reference/get_post_meta. Worked fine. Next I would like to get my custom fields to show in list of all events and I it would be nice to know how.

    bhasic
    #5349

    Simply edit the appropriate template: http://wp-event-organiser.com/documentation/editing-the-templates/ to include get_post_meta(get_the_ID(), ‘field’, 1 )

    Stephen Harris
    #5351

    I meant the All Events page in admin area. I think it’s event-organiser-manage.php and there not a template for that. Or i’m doing something wrong. Great plugin btw.

    bhasic
    #5352

    Ah I see, events are just ‘event’ post type, so you can additional columns as you would any other post type, see this post.

    The event-organiser-manage.php (source) uses the same method to add/remove columns from that page.

    Stephen Harris
    #5353

    And thank you 🙂

    Stephen Harris
    #5359

    Thanks for the info. Managed to get it to show what I needed.

    bhasic
Viewing 8 posts - 1 through 8 (of 8 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.