I am working in a child theme and need to the category posts to be sorts by the custom field date rather than the wordpress publish date. Can anyone point me in the right direction?
This is what I have in my content-single.php
file:
<h1 class="info"><?php the_field('start_date'); ?> - <?php the_field('end_date'); ?></h1>
<h1 class="info"><?php the_field('time'); ?></h1>
<h1 class="info"><?php the_field('venue'); ?></h1>
<a href="<?php the_field('tickets_link'); ?>"><h1 class="buytix">BUY TICKETS<?php the_field('buy_tickets'); ?></h1></a>
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'vantage' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'vantage' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
I am very new to php and wordpress. I am working in a child theme. What code do I need to add so that the posts order by the custom field date and where exactly do I need to put it?