Created
November 23, 2013 11:11
-
-
Save dompascal/7613345 to your computer and use it in GitHub Desktop.
WP - ACF - Flexible Content - Leaderboard AD
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 while(has_sub_field('ads','option')): ?> | |
<?php if(get_row_layout() == '728_x_90_leaderboard'): ?> | |
<!-- leaderboard AD --> | |
<span class="leaderboard"> | |
<?php if(get_sub_field('ad_image_728_x_90')) { ?> | |
<a class="ad" href="<?php the_sub_field('ad_link_728_x_90'); ?>" target="_blank"> | |
<?php $image = wp_get_attachment_image_src(get_sub_field('ad_image_728_x_90'), 'large'); ?> | |
<img src="<?php echo $image[0]; ?>" alt="" /> | |
</a> | |
<?php } else { ?> | |
<?php the_sub_field('ad_embed_code_728_x_90'); ?> | |
<?php } ?> | |
</span> | |
<!-- end leaderboard AD --> | |
<?php endif; ?> | |
<?php endwhile; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment