ConnorJack
Member
Posted 2 years ago #
Hey,
I have some [Google Adsense] ads on my site. I'd like to remove these if the user is logged in. I've tried a few methods but they don't seem to be working. Any help?
Thanks in advance
PS: If it helps, this is the site that I am working on: http://simoperations.com/
Maybe this one?
<?php
if ( is_user_logged_in() ) {
echo '<div class="ad" style="display:none;">';
} else {
echo '<div class="ad">';
};
?>
<!-- your ad code here -->
</div>
Peter
ConnorJack
Member
Posted 2 years ago #
Wow! Thanks so much, pboosten! That's done it! My users and I will be happy now!
:D :D :D