I have a custom event-pod with these variables: url, date, time
So far this code is working:
<?php
$args = array(
'orderby' => 'date',
'post_type' => 'event',
);
$the_query = new WP_Query( $args );
if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
<div><?php the_field('title');?></div>
<?php endwhile; else: ?> <p>Sorry. Calendar not up-to-date.</p> <?php endif; ?>
Echoing the title of each event is working, but how do I get the other variables ("date, time and url")?
I solved it this way: