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


Scaleforetail

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.


Scaleforetail

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);
}


Scaleforetail

November 16, 2018 at 6:13 am

This works perfectly. Thank you.

You must be logged in to reply to this support post. Sign In or Register for an Account

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: publish

Updated by  Scaleforetail 3 days, 10 hours ago ago

Topic Tags

Notifications

This topic is:
pending
Do NOT follow this link or you will be banned from the site!
[i]
[i]