Support » Fixing WordPress » Can I hide Google AdSense by certain user level?

  • Hello,

    Would it be ok for me to use the bellow code to allow me to hide Google AdSense for certain wordpress user levels? So only normal subscribers can see the Advertisements, and if people subscribe and become a premium member which is level 5+ etc then they do not see them. I’m unsure whether this would be fine/allowed by Google.

    Here is the code:

    <?php
    if (current_user_can(‘level_5’)) : ?>

    <?php elseif (current_user_can(‘level_0’)) : ?>

    ADSENSE CODE.

    <?php print “”; ?>
    <?php else : ?>

    ADSENSE CODE.

    <?php print “”; ?>
    <?php endif; ?>

    Many thanks,
    Elliot Sowersby.
    http://www.vanity-tournaments.com

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Can I hide Google AdSense by certain user level?’ is closed to new replies.