bb5999 asked: “How to:remove ads for registered users?”

On the WordPress codex, bb5999 asked how he can remove ads for logged in users. Here’s a very easy way to hide ads to registered users.

Hiding ads for registered users is a good idea since it can help you to decrease the risk of being smart-priced by Adsense.
To achieve this, we just have to use the is_user_logged_in() function, which returns true is an user is logged in.
This recipe is very easy to use, just paste the following code anywhere on your theme.

if (!is_user_logged_in()) {
// Insert Adsense (or whatever) code here
}

Leave a Comment

* Name, Email, Comment are Required
Blog And Make Cash