Hi,
with the help from this thread: [https://www.reddit.com/r/Wordpress/comments/ywvzvz/comment/iwlrarv/?context=3]) i was able to create this code:
if ( function_exists( ‘pmpro_displayAds’ ) && pmpro_displayAds() ) {
echo ‘<script async src=”https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-xxx” crossorigin=”anonymous”></script>’;
}
But AdSense doesn’t load the Code when a user hasn’t a memberships, that is freed off in the PMPro Settings. My Admin Account has not the Ad-Free Membership, but AdSense is still not loaded. In the Source Code it doesn’t even referende.
I added the code above into the Code Snippets Plugin.
[ad_2]
Oh, the affected site is
Have you tried contacting the team at Paid Memberships Pro for assistance with this?
Hi everybody! Found a way! Used PMPro’s [membership level] shortcode, added the code inbetween and selected to show it to everyone without a membership. Not the best, but hey, it works perfectly fine. 🙂