daily pastebin goal
11%
SHARE
TWEET

Example of listing ticket names/prices (EDD Tickets)

BakerMan Feb 6th, 2014 225 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <p> Tickets for this event: </p>
  2.  
  3. <ul>
  4.         <?php
  5.         $edd_tickets = TribeEDDTickets::get_instance();
  6.         $tickets = (array) $edd_tickets->get_tickets_ids( get_the_ID() );
  7.         $count = 0;
  8.  
  9.         foreach ( $tickets as $ticket_id ) {
  10.                 $count++;
  11.                 $ticket = $edd_tickets->get_ticket( get_the_ID(), $ticket_id );
  12.                 echo "<li> $ticket->name = $ticket->price bucks </li>";
  13.         }
  14.  
  15.         if ( 0 === $count ) echo '<li> No tickets </li>';
  16.         ?>
  17. </ul>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top