Support

Home Forums Event Espresso Premium Add images & videos to event page

Add images & videos to event page

Posted: November 9, 2018 at 5:30 pm

Viewing 4 reply threads


Ash

November 9, 2018 at 5:30 pm

Hi,

I would like to have additional “description” section after the “ticket selector” and before the “venue” section where I can add sponsor logos and testimonial videos. How can I achieve this as I still want to keep the original “description” section before the ticket selector to have the event sales copy.

Thanks,
Ash


Josh

  • Support Staff

November 12, 2018 at 3:50 pm

Hi Ash,

You can do this with the Advanced Custom Fields plugin & a bit of custom code. First, you install the ACF plugin, then add a field group and a custom field. This can be set to only appear when the post_type is espresso_events.

Then, you add some custom code like this to your custom site plugin:

add_action(
  'AHEE__ticket_selector_chart__template__after_ticket_selector',
  'my_custom_field_display_after_tickets',
  10,
  2
);

function my_custom_field_display_after_tickets($EVT_ID, $event) {
  if(!function_exists('the_field')) {
    return;
  }
  the_field('text_area', $EVT_ID);
}

In the above example the field name is text_area, yours will likely be different.

You can add the above to a functions plugin or into your WordPress child theme’s functions.php file.


Ash

November 12, 2018 at 4:25 pm

Thanks for the information Josh. I implemented what you suggested and the new section now appears – BUT it correctly appears after the ticket selector ….but BEFORE the REGISTER button. How do I get my new custom field to appear after the REGISTER button?


Josh

  • Support Staff

November 12, 2018 at 4:33 pm

OK in that case you could do this instead:

add_action(
  'AHEE_event_details_before_venue_details',
  'my_custom_field_display_after_tickets',
  10
);

function my_custom_field_display_after_tickets($post) {
  if(!function_exists('the_field')) {
    return;
  }
  the_field('text_area', $post->ID);
}


Ash

November 16, 2018 at 6:13 am

This works perfectly. Thank you.

Viewing 4 reply threads

The support post ‘Add images & videos to event page’ 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.

Event Espresso