How to display the parent category if only the child category has been chosen

There’s a function called get_category_parents that will return a list of parents based on the ID. You can then loop through this list to display the parents.

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