If you have ads on your blog and you do not wish to see them from appearing when you are login, you may wish to use this piece of code. I found it quite useful to keep myself from looking at the ads and also to prevent self clicks as well. You wouldn’t want to get banned from Adsense, do you? This code is not being implemented here but on another blog. Here is just where I gonna post my codes and notes.
[sourcecode language="php"]
<?php global $user_ID;
get_currentuserinfo();
if (‘admin’ == $user_ID) {
<!– text that logged in users will see –>
}
else {
<!– text that non-logged in users will see –>
}
?>
[/sourcecode]
You must log in to post a comment.