We want to show on the events single page how many tickets have been sold and show how much tickets are in stock.
Tried to use this code in the tribe-events/single-event.php:
<span class=”show-sold-count”>
<?php
// DISPLAY SOLD X OUT OF Y
global $post;
echo get_post_meta($post->ID, ‘total_sales’, true);
echo ‘ out of ‘;
echo $product->get_stock_quantity();
?>
</span>
It didn’t work for us. What’s the best way to show it?
-
This topic was modified 8 years, 8 months ago by Chris.