Attempting to loop through a set of categories and display the title of the latest post from each.
$feed_sources = array('goose-creek','sleepy-creek','fobr');
foreach ($feed_sources as $feed) {
$args = array('category_name' => $feed, 'posts_per_page' => 1);
$show = get_posts($args);
print_r($show);
This code returns
Array ( [0] => WP_Post Object ( [ID] => 79 [post_author] => 1 [post_date] => 2015-03-19 08:58:40 [post_date_gmt] => 2015-03-19 09:58:40 [post_content] =>
But I've had no luck in accessing it with $show[0]['post_title'], $show[0][post_title], or $show[0]->'post_title'
Also, is there a simple way to get this array to work with basic theming functions such as the_title(); the_content(); etc?