Category archive is displaying all posts rather than the specific category

You are overwriting the query that loads with the page (which you saved to $temp) – why not just use the one that loads with the page:

while(have_posts()) : the_post();

// put the post here

endwhile;

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