How do I use foreach to get content from a custom-field in multiple posts?
The custom fields I am using are from the plugin ACF (Advanced Custom Fields). I finally looked at the ACF website, which I should have done originally, and found the function get_field can specify a post so here is the working code: $posts = get_posts(array( ‘numberposts’ => -1, ‘post_type’ => ‘post’,)); foreach($posts as $post) { … Read more