here is the code how to fetch the advance custom field in wordpress template page
For text fields
<div class="row">
<div class="col-sm-4">
<a href="<?php echo get_field( 'book_link_amazon'); ?>" target="_new">
<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/images/amazonr.png" style="height:100px;" />
</a>
</div>
For image
<div class="col-sm-3">
<?php if(get_field('film_award1') ): ?>
<img src="<?php the_field('film_award1'); ?>">
<?php endif; ?>
</div>
For text fields
<div class="row">
<div class="col-sm-4">
<a href="<?php echo get_field( 'book_link_amazon'); ?>" target="_new">
<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/images/amazonr.png" style="height:100px;" />
</a>
</div>
For image
<div class="col-sm-3">
<?php if(get_field('film_award1') ): ?>
<img src="<?php the_field('film_award1'); ?>">
<?php endif; ?>
</div>
No comments:
Post a Comment