CodeHQ

Archive for March, 2016

|

Using media gallery image sizes with ACF | WordPress

Friday, March 25th, 2016

You can use thumbnail, medium, large or full as the sizes variable to serve the size image you require.

<?php $image = get_field('the_image'); ?>
<img src="<?php echo $image['sizes']['thumbnail']; ?>" alt="<?php echo $image['caption']; ?>" />

Tags: , , , , , , ,
Posted in PHP, WordPress | No Comments »

CSS animated hamburger menus

Wednesday, March 9th, 2016

Tags: , , , ,
Posted in CSS, HTML | No Comments »

Hiding empty fields with ACF | WordPress

Tuesday, March 8th, 2016

<?php if( get_field('video_url') ):?>
	Show this if field exists <?php the_field('video_url');?>
<?php else : ?>
    Show this if not
<?php endif;?>			

Tags: , , ,
Posted in PHP, WordPress | No Comments »