... orderby date
$lastDate = null;
foreach ($posts as $post) {
if ( $post->date !== $lastDate ) {
echo $post->date;
$lastDate = $post->date;
}
// остальной вывод данных
}
select * from table where column2 = $search
union
select * from table where column3 = $search
JSON_ERROR_RECURSION One or more recursive references in the value to be encoded
$wpdb->get_row("SELECT ID, post_title FROM $wpdb->posts WHERE post_type='post' AND post_status='publish' AND post_author='".$post->post_author."' AND post_date < '".$post->post_date."' ORDER BY post_date DESC LIMIT 1;");
<textarea name="text" id="text" form="contact_form"></textarea>