Created
May 7, 2019 15:04
-
-
Save brianpurkiss/c5da1e0e47b01dbe4b42eb203c32b622 to your computer and use it in GitHub Desktop.
ACF Link
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 // Sample code for the Relational > Link ACF field ?> | |
<?php $link = get_field('link'); | |
$link_url = $link['url']; | |
$link_title = $link['title']; | |
$link_target = $link['target'] ? $link['target'] : '_self'; ?> | |
<p> | |
<a href="<?php echo esc_url($link_url); ?>" target="<?php echo esc_attr($link_target); ?>" class="text-info"> | |
<?php echo esc_html($link_title); ?> <i class="fa fa-caret-right"></i></a></p> | |
</a> | |
</p> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment