-
Author
-
February 17, 2017 at 18:37 #153317hejmsParticipant
Hi Sweetdate Support.
I just got accepted by Google to use ads on my site.
Paid Membership Pro says that you should use a plugin called “Easy Adsense” if you want to hide the ads for some memberships, but I can’t seem to find any plugin that are called that?
It also suggest you can write ”
COPY CODEif(pmpro_displayAds()) { //insert ad code here }
”
around the script, but if I do that it doesn’t work at all.Or maybe I’m just doing it wrong?
I put a widget with text/html and write the code, but it doesn’t do anything.If I write it without “if (pmpro displayAds())” and so on, it works, but then all my members can see the ads, and isn’t hidden for VIP-members.
Kind regards
HenrikFebruary 19, 2017 at 20:16 #153441LauraModeratorHello, this one? https://es.wordpress.org/plugins/easy-adsense-lite/
You could use this insteadCOPY CODE<?php if ( pmpro_hasMembershipLevel(array(3))) { ?> AD SCRIPT HERE <?php } ?>
Basically, the membership level 3, can see ads, the others wont
Just change the numberHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
February 19, 2017 at 22:01 #153454hejmsParticipantYeah that was the plugin I found, but that doesn’t hide the ads automatically like the plugin Paid Memberships Pro were talking about 🙂
But I tried to use your code inside the plugin, but it doesn’t work. It shows the ads for all membership users (all ID’s).
I then tried to write it into the Text/HTML widget, but it just says “Error occurred. Please reload the page and try again” and it doesn’t save the code inside it.
February 21, 2017 at 01:51 #153633LauraModeratorHello, will assign the ticket to a higher support level who can help and advise you in your query.
Thanks! ?Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
February 21, 2017 at 18:13 #153715RaduModeratorHi,
This conditional tag it works make sure to not making something wrong
COPY CODE//1,2 represents id's of packages that you want to see your message if(pmpro_hasMembershipLevel(array(1,2), get_current_user_id())){ echo 'banner code' ;} }
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionFebruary 22, 2017 at 13:34 #153869RaduModeratorIf you use those in widget area the php codes sure will not work and you will have to use shortcodes
All pmpro conditional shortcodes are here :
So you will have to place your banner code inside the shortcodes
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionFebruary 22, 2017 at 19:07 #153914RaduModeratorFrom example in the widget area as you had said in the initial post
[membership level=”1″]
banner code for level 1
[/membership]the shortcodes works in text area from widgets
And so on..
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionFebruary 23, 2017 at 15:33 #153992RaduModeratorGreat
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
You must be logged in to reply to this topic.