I am trying to sort this list from ACF in alphabetical order. I haven't come up with any great solutions so far.
This is code is placed on a single-custom.php template so there is no loop to adjust.
<?php $providers = get_field( 'providers' ); ?>
<?php if ( $providers ) { ?>
<ul class="list-unstyled">
<?php foreach ( $providers as $post ): ?>
<?php setup_postdata ( $post ); ?>
<li>
<a href="<?php the_permalink(); ?>">
<?php the_title(); ?>
</a>
</li>
<?php endforeach; ?>
</ul>
<?php wp_reset_postdata(); ?>
<?php } else { ?>
<p class="small"><em>There are no providers currently linked to this location. Please check back later.</em></p>
<?php } ?>