Im using advanced custom fields and I want to display a line if both fields are active.
I currently have one checking for a spotify link and one checking for an iTunes link. What I would like to do is display a | (to separate the text) if both fields are being used otherwise the | remains hidden.
Here is my code:
<?php if( get_field('spotify') ): ?>
<a target="_blank" href="<?php the_field('spotify');?>">Spotify</a>
<?php endif; ?>
<?php if( get_field('spotify','itunes') ): ?>
|
<?php endif; ?>
<?php if( get_field('itunes') ): ?>
<a target="_blank" href="<?php the_field('itunes');?>">iTunes</a>
<?php endif; ?>