Notice- undefined variable post and trying to get property of non-object

If you are using a custom loop. Please use $query->post to get the post object.

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