Hey Roaning Elepants...
Does the trailing "}" in your code, replace the one that wasn't included in the original code?
In your original code, it doesnt show the trailing "}", but has it in the actual code, which you include in the replacement code.
Did I make any sense? lol
Meaning replace this original code:
if ( $query->have_posts() )
$date = $query->posts[0]->post_modified_gmt;
}
With this replacement:
if ( $query->have_posts() ) {
$date = $query->posts[0]->post_modified_gmt;
$date = date( 'c', strtotime( $date ));
}