custom query with custom post type and category slug

To get the category slug in a category archive page use:

$cat = get_queried_object();
$slug = $cat->slug;

get_queried_object fetches the currently queried object, e.g. the category object in a category page or the post object in a single post page.

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