How to show custom post template from single page?

I believe you might need to use in_category() instead of is_category().

in_category() checks if the current post is in a category, is_category() checks if it’s a category archive page.

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