Get posts only from current calendar week

I think I know what happens here…

Most probably that Monday is another week – last one in 2018, and it makes sense. Last day of 2018 can’t be the first week of 2019 😉

So I would query it in a different way:

'date_query' => array(
    'after' => '-' . (intval(date('N')) - 1) . 'days',
    'inclusive' => true
)

What it does is takes all posts published after given date. And to compute that date we take current day and substract the current day of the week – so we get last Monday…

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)