Hot answers tagged

2

It's already in the docs. Try this: <?php $image = get_field('image'); if( !empty($image) ): ?> <img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" /> <?php endif; ?> For easier debugging, try this: var_dump($image); to print out the $image variable to know what is in $image. You can also put ...


2

Probably the most "WordPress-y" approach to such a problem is to store the date of your 'event' custom post-type in the post's metadata. Enabling users to set meta-data on a post is usually accomplished by using the 'register_meta_box_cb' argument to the register_post_type() function to add an extra "meta box" interface to the pages for creating or editing a ...



Only top voted, non community-wiki answers of a minimum length are eligible