Support » Plugin: Paid Memberships Pro » Disabling Ads for members

  • Hello
    I am having trouble with my wordpress site
    I want to have it set up so that ads show up in the text of the stories (in text ads) and on the sidebar widget area. But I only would like ads to show to people who are not members and not logged in. I have installed a plugin called Paid Membership Pro which has been awesome in restricting content, buy not so awesome at restricting ads. When my test user who is a member logs in all the content is unrestricted, but ads are still present. In the advanced settings of Paid membership Pro I have set the settings to “Hide ads from all members” Underneath the settings it also says
    “Ads from the following plugins will be automatically turned off: Easy Adsense, …

    To hide ads in your template code, use code like the following:

    //insert ad code here

    I have installed Easy Adsense pasted my Adsense code into the “Widgets for sidebar section” The ads still show regardless of whether or not a member is logged in. So I tried the template code with the adsense code pasted in their. No luck.

    When I tried pasting the template code into a text box for the widget bar, The ads still show up, but “if(pmpro_displayAds())
    {” is displayed as a “class” = text if you look at the page source.

    Also in the Easy Adsense settings there is this:
    “If you want to suppress AdSense in a particular post or page, give the comment “<!–noadsense–>” somewhere in its text.

    Or, insert a Custom Field with a key “adsense” and give it a value “no”.

    Other Custom Fields you can use to fine-tune how a post or page displays AdSense blocks:
    adsense-top, adsense-middle, adsense-bottom, adsense-widget, adsense-search
    left, right, center, no”

    I will leave both the Easy Adsense and the text ads up on the sidebar where the widgets are so you guys can view for troubleshooting.

    As far as making this work I have no clue, I have tried so hard to make this work the past two days, and I need the communities help now. Please save me!

    Thanks for any help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jason Coleman



    I’m not sure when, but at some point Easy AdSense updated their plugin and the way we were integrating with them failed. I’ve updated the DEV version of PMPro to include a fix for newer versions of Easy AdSense.

    The next PMPro update (sometime this week) will include the fix. If you want to patch your version PMPro now, you just need to add this code section to in place:

    Thanks for the heads up RE this. Hope this helps.

    Thanks for the quick reply. I just got done testing the site with the new code and I had no luck. The ads still appear when logged in as a member. Now it could be that your code is fine, and maybe it’s just my site, but it doesn’t work for me.

    Maybe I am doing something wrong, not sure.

    OK here’s what I did. Because you said that it worked with previous versions of Easy Adsense I downloaded Easy adsense 5.0. I found it under the developer tab for the easy adsense plugin here:

    I downloaded it and then uploaded it to my site under the public html wp content plugins.

    I activated the plugin and did not update it.
    After that I started setting up the advanced settings for Paid membership Pro advertisements to be disabled for all members.

    After all that the ads did not show up. So 5.0 Easy Adsense and Paid membership Pro work*

    *they only work if the sidebar does not have priority. Under the Easy Adsense options there is an option for “Prioritize sidebar widget. (Always shows the widget, if enabled.)”

    Do not click it if you want it to be suppressed by Paid membership Pro. If you want more ads on the sidebar then click:
    “Any number of ad blocks (At your own risk!)”

    This will make more show up then just 1.

    Thanks for the help StrangerStudios.

    I hope this helps anyone else who is stuck 🙂

    Plugin Author Jason Coleman


    Thanks for coming back and posting what worked for you. When I get a chance, I might process some of this more and try to make the integration with Easy AdSense (newer versions) more seamless.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Disabling Ads for members’ is closed to new replies.