Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

link acf

<?php 
$link = get_field('link');
if( $link ): 
    $link_url = $link['url'];
    $link_title = $link['title'];
    $link_target = $link['target'] ? $link['target'] : '_self';
    ?>
    <a class="button" href="<?php echo esc_url( $link_url ); ?>" target="<?php echo esc_attr( $link_target ); ?>"><?php echo esc_html( $link_title ); ?></a>
<?php endif; ?>
Source by www.advancedcustomfields.com #
 
PREVIOUS NEXT
Tagged: #link #acf
ADD COMMENT
Topic
Name
6+1 =