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>';
}
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>';
}