How do I display posts by day?

You’d have to specify day, month, and year to get today’s posts:

$my_query = new WP_Query( array(
    'cat'=>1,
    'year'=>date('Y'),
    'monthnum'=>date('m'),
    'day'=>date('d'),
    'posts_per_page'=>-1 ) );

Leaving day blank just doesn’t set that query var, so its not restricting your query at all.

Leave a Comment

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