Created
January 19, 2017 19:14
-
-
Save fieldoffice/0613d8918aa2e2c917509c76d05e7ef6 to your computer and use it in GitHub Desktop.
acf-repeater-if-else
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$service_link = get_sub_field('service_link'); | |
$service_title = get_sub_field('service_title'); | |
if( $service_link != '' ){ ?> | |
<a href="<?php echo $service_link; ?>" title="<?php echo $service_title; ?>"><?php echo $service_title; ?></a> | |
<?php } else { ?> | |
<?php echo $service_title; ?> | |
<?php } ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment