If you use ads as a way to monetize your site, you can optionally wrap the ad block with a built-in PHP function in order to hide or customize those ads to site members. This can be a unique value offering for users interested in having an ad-free or more ad-targeted experience on your site!

The pmpro_displayAds() Function

This PHP function checks against the “Hide Ads from Non-Members” settings under Memberships > Advanced Settings. It allows you to wrap and insert ad blocks that will load based on how you have configured the admin setting.

    //insert ad code here

Third-Party Ads Plugin Support

Advanced Ads Pro allows you to manage ads on your membership site by targeting ads in relation to the membership level of your visitors. Refer to this tutorial for more details on the Paid Memberships Pro integration for Advanced Ads Pro.