Hello I am not sure why
is_admin
is not Working for me.
Here is my code.
if($featuredADS == "0" || $availableADS == "0" || empty($result) && $countPosts >= $postLimitperUser && $postLimitOn == 1 && !is_admin()){
//Some Code here
}else{
//Some Code here Which is always Work for admin
}
I want to ignore this check for admin user. If user is admin then i want to run code from (else).
The is_admin() conditional tag only checks if the Dashboard or the administration panel is attempting to be displayed. Try current_user_can() instead.