empty WP_Query object on local install

It’s empty because you’re looking at it before it has a chance to be populated.

The top of functions.php is too early. You should be doing it in a ‘template_redirect’ action.

Or, better yet, use the Debug Bar plugin.

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