• Hi,

    I’m using another adsense plugin (not easy adsense) who is using shortcodes to display adsense ads in specific place (AdSense In-Post).

    So i need to know please :

    1. How to hide adsense to members of specific membership level ?

    2. I i need to add the code below, please tell me where to add, in which file ?

    if(pmpro_displayAds())
    {
        //insert ad code here
    }

    Thanks

    https://wordpress.org/plugins/paid-memberships-pro/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hey there,

    1. You can use the pmpro_hasMembershipLevel() function to check for membership first.

    2. You should use that code anywhere you want to display an ad in your template files, however if you want to check specific levels, you should use the function above instead.

    Does that clear things up?

    Thanks,
    Jess

    Thread Starter liensenor

    (@liensenor)

    Hi,

    Thank you for the answer. I really appreciate. But,

    1. I usign a plugin where I paste the adsense code and I have after that a shortcode to add in my post. So how to do ?

    2. you ask me to paste the code anywhere, Ok but do i need to paste it on post editor or on plugin file ? If plugin file, where?

    Cheers

    Sorry for the confusion, I didn’t really understanding you were using shortcodes. In that case, you could you use the [membership][/membership] shortcodes to restrict content by level. Instructions on how to use it are here.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘how to hide adsense advertising using another plugin’ is closed to new replies.