How can I show a specific page to admins only?

if not admin redirects to front page

try this function in the top of the file

if(!current_user_can('administrator')){
  echo '<a href="'.home_url().'" id="notAdmin"></a>';
  echo '<script>document.getElementById("notAdmin").click();</script>';
}

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