Tag Info

New answers tagged

0

You should insert the validator, like this, so it will send only 1 mail in a day: $timeN = date('H:i'); $timeS = date('10:00'); if ($timeS == $timeN) { if (get_option('last_mail_sent_time')!= date('d')) { //your codes here //then update_option('last_mail_sent_time', date('d')); } }


1

Here are two ideas for your date_query part: 1) After 2 days ago: If you need posts published after current time, 2 days ago: 'date_query' => array( array( 'after' => '2 days ago', // or '-2 days' 'inclusive' => true, ), ), then the corresponding SQL part is: post_date >= '2014-09-09 17:57:15' if the ...



Top 50 recent answers are included