Support

Home Forums Event Espresso Premium Accessing EE4 Event Data

Accessing EE4 Event Data

Posted: March 11, 2015 at 8:26 am

Viewing 3 reply threads


Kish Parmar

March 11, 2015 at 8:26 am

I’m in the process of migrating from EE3 to EE4. In EE3 I was using the custom posts to display the events archive and single event template.
I’ve managed to get the events archive working as it previously did but I’m having accessing certain data in the single template.
For example in EE3 I used the following:

$event_location = get_post_meta($post->ID, 'event_location', true);

$event_price = '£' . do_shortcode('[EVENT_PRICE event_id="'.$event_id.'" number="0"]');

$event_time = do_shortcode('[EVENT_TIME event_id="'.$event_id.'" type="start_time"]');

echo do_shortcode('[ESPRESSO_CART_LINK event_id="'.$event_id.'" direct_to_cart=1 moving_to_cart="Redirecting to cart..."]' );

What would the equivalent of those be for EE4?


Lorenzo Orlando Caum

  • Support Staff

March 11, 2015 at 11:10 am

Hi Kish, Event Espresso 4 doesn’t have a shopping cart option and events in Event Espresso 4 are custom post types.

Which part of the code are you trying to update for Event Espresso 4?

Is this question related to changing content that is shown on the Event Espresso event listing page or single event pages?


Lorenzo


Kish Parmar

March 11, 2015 at 12:31 pm

I’m trying to change the content on the single-events page.
Could you give me an example of the code to use in order to display a single ticket price for example.


Lorenzo Orlando Caum

  • Support Staff

March 11, 2015 at 1:00 pm

Hi,

That information should appear automatically on the single event page.

We do have a shortcode to display the ticket selector:

https://eventespresso.com/wiki/ee4-shortcodes-template-variables/#ticket-selector

Also see this support post for showing the first price available:

https://eventespresso.com/topic/custom-ticket-selector-template/#post-144791


Lorenzo

Viewing 3 reply threads

The support post ‘Accessing EE4 Event Data’ 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