Tags on page (not post) returns nothing – why? Improved clarified question!

I solved it. Should be using elseif($tag->slug) instead of elseif($tag->name) or else it will never be true.

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