Conditional statements using category and Tags

If you’re viewing a category or tag archive, you can access that category or tag object via get_queried_object()

$queried_object = get_queried_object();
echo $queried_object->name;

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