WordPress Frontend Check If Current User Is Administrator

Apparently the function is not defined at the point of calling your code ..so wrap the code of yours in to a function and hook it to the init.

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