If category then echo a custom fields
Use the in_category() function, like this: <?php if ( in_category( 4 ) ) : ?> <div class=”event-post-icons”> <ul> <li class=”single-post-date”><?php the_field(‘event_date’); ?></li> <li class=”single-post-time”><?php the_field(‘event_time’); ?></li> <li class=”single-post-price”><?php the_field(‘booking_fee’); ?></li> <li class=”single-post-palce”><?php the_field(‘event_location’); ?></li> </ul> </div><!– /event-post-icons –> <?php endif; ?> If you are using this to test a post outside of The Loop, you … Read more