Posted: June 19, 2016 at 2:37 am
|
Hi I’m running events that have only one level of pricing and only one venue – so any event can only have one price or venue associated with it. I’m using EE_Event_List_Query() to pull the details of event dates and timing and would like to add venue and price to this. Is this possible – if not how might I approach it? This is the code I’m currently using: <ul class=”events”> <li class=”course_listing group”><?php the_post_thumbnail();?> <div class=”course_details”> <?php do_action( ‘AHEE_event_details_after_the_event_title’, $post ); ?> <h2> </h2> ” class=”full_details”><?php the_title();?> – full course details… <?php <?php Thanks!, Andrew |
The price is assigned to the tickets and tickets are assigned to the datetime, so as you have the datetime already you can use:
$tickets will then be an array of EE_Ticket objects even if you have a single ticket. So you want to grab the single ticket from the array:
Then output the price: if( $ticket instanceof EE_Ticket ) { $ticket_price = $ticket->get_ticket_total_with_taxes(); echo $ticket_price; } You may also want to use something like:
I would recommend installing Kint Debugger, you can then wrap each variable within |
|
The support post ‘Returning a Single Price for an event’ 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.