Even with PHP plugin get_posts not working in widget area
Tuns out it needed: global $post Complete working code: <div class=”aboutgridcont”> <ul class=”about-us-grid”> <li> <?php global $post; $posts = get_posts(‘post_type=employee&orderby=rand&numberposts=16′); foreach($posts as $post) { ?> <img class=”headshot” src=”https://wordpress.stackexchange.com/questions/196622/<?php the_field(“headshot’); ?>”> <?php } ?> </ul> </div>