Hide or Show Ads with Pro membership

I remember someting back with Pro Sites when it was the Supporter plugin that it was possible to put in an Adsence code into the global footer with a code to hide or show content if member.

Is there a code for the global footer content to hide or show content for members?

  • 3SixtyEvolve
    • New Recruit

    Hi dutchmen

    Greetings from the WPMU DEV Support Desk and thank you for being a member.

    I believe this is possible – unfortunately I wasn’t able to get the proper code for this myself. So I will follow up with the Developer to see how he can assist. Allow me some time to get back to you with feedback.

    Thank you and have a great day!

    GinaB

  • 3SixtyEvolve
    • New Recruit

    Hi dutchmen

    I hope this would be helpful, but we have the conditional statements that can be used for the Pro Sites/ Previously Supporter Plugin:

    is_supporter()

    or is_supporter($blog_id), where blog ID is the blog ID (integer)

    And then this is also available:

    is_supporter_user($user_id), where $user_id is the user ID (integer)

    Don’t know if this would help in your case, but I thought I would give it a go. :slight_smile: If this is no good, I will get the Developer to drop in and give more expert advice.

    Have a good day and talk soon!

    GinaB

  • Dutchman
    • The Bug Hunter

    What I have done is using this code:

    <?php

    if (supporter_hide_ads()) {

    //do not show ads

    } else {

    //show ads

    ?>

    ad content goes here

    <?php

    }

    ?>

    And it doesn’t work unfortunately. The ad content will be shown at all times. Doesn’t matter if the blog/site is on Free mode or Pro Site mode.

    Any solution for this? Or maybe the developer can ad an option with the “show ads on pages/post” also a “put ads in footer” option. :wink:

  • 3SixtyEvolve
    • New Recruit

    Greetings @dutchmen

    Hope you’re well.

    It’s been a while since I last heard from you, so just checking in to see if you need any further assistance. I will resolve this thread, however, please don’t hesitate to reopen it if you still require additional feedback from our Support Team. Just select the ‘Mark as Not Resolved (re-open)’ box below the post area (otherwise we might miss your new post).

    If you managed to solve the problem, I’m delighted.

    Have a good day!

    GinaB

  • Dutchman
    • The Bug Hunter

    Hello Gina!

    Thanks for checking up on me :wink:

    I havent got back to that because I changed method of using advertising in sub site.

    But it sure will work with the link you already gave me. If I need further assistants with it, I will reopen the ticket.

    Thanks again and keep up the good work!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.