Adding an extra photo field to the venue details

WordPress Event Management, Calendars & Registration Forums General Question Adding an extra photo field to the venue details

This topic contains 1 reply, has 2 voices, and was last updated by  Stephen Harris 9 years, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #18065

    I’m wondering if there’s a way to add another photo field to the venue details? I’ve noticed that you can only add text fields and checkboxes and such with the Pro plugin and have seen that Advanced Customs Fields won’t show up on the venue details page. Is there any sort of work-around to make it possible to add an additional image for each venue? Thanks!

    Ashley Engel
    #18074

    Hi Ashley,

    Pro allows you to assign an image to a venue. It is possible to add additional metaboxes to add any custom field (see, for example: http://wp-event-organiser.com/documentation/developers/venue-meta-data-and-metaboxes/).

    Uploading images is slightly different, in your metabox you’ll probably want to invoke WordPress’ media modal to handle the uploads for you. You then just need to assign the thumbnail ID to the venue.

    You can see how the plug-in renders the metabox at the bottom of /admin/includes/venues.php. The javascript invoking the media modal can be found in /admin/js/venue-featured-image.js. What that does is make an ajax request every time the featured image is selected/deslected to add/remove the image from the venue.

    You could do something similar to allow the user to select an additional image.

    Unfortunately advanced custom fields will not work with venues, as the venues are a taxonomy, and ACF only works with posts.

    Stephen Harris
Viewing 2 posts - 1 through 2 (of 2 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.