Detect archive and category page

There are Conditional Tags for this: is_archive() and is_category() respectively. For a custom post type archives you could use is_post_type_archive(). There are many conditional tags available, see above linked codex page. To determine the blog archive you have to additionally check for the post type post, take a look at this question and the answers for more useful information.

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