-
Author
-
December 16, 2017 at 02:46 #183200graphiteParticipant
Hi,
Can I prevent certain pmpro levels from creating a Buddypress group?
The old code seems not working:
header.php <?php if ( pmpro_hasMembershipLevel(array(2,3))) { ?> <style> form#groups-directory-form .button:nth-child(2n) { display: initial !important; } </style> <?php } ?>
style.css form#groups-directory-form .button:nth-child(2n) { display: none !important; }
Thank you 🙂
December 16, 2017 at 19:04 #183251Kieran_SQModeratorHi,
Thanks for reaching out, can you please update this ticket with some admin credentials so I can have a look at both the front and back end.
Thanks,
Kieran
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionIf you like the theme or the support you've received please consider leaving us a review on Themeforest!
Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.
December 17, 2017 at 16:23 #183277Kieran_SQModeratorHi,
Please can you test the change I just made with an admin account and a standard user with the membership level that should not see the create group button.
I changed the PHP used in the header.php file to
COPY CODE<?php if ( pmpro_hasMembershipLevel(array(2,3))) { ?> <style> li#group-create-nav { display: initial !important; } </style> <?php } ?>
I also changed the CSS used in style.css to
COPY CODEli#group-create-nav { display: none !important; }
If you are caching for logged in users please make sure to clear your website cache and local cache (Ctrl+F5) when you log out of X account to switch to the other.
Thanks,
Kieran.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionIf you like the theme or the support you've received please consider leaving us a review on Themeforest!
Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.
December 18, 2017 at 20:22 #183420Kieran_SQModeratorHi,
I will refer this ticket to a developer for review as it doesn’t seem to working with a CSS rule for unset. They’ll be in touch with you as soon as they can, Monday to Friday, East Europe Time.
Thank you for your patience,
Kieran
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionIf you like the theme or the support you've received please consider leaving us a review on Themeforest!
Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.
December 20, 2017 at 23:55 #183563graphiteParticipantThank you Kieran!
Looking forward to receiving the reply 🙂
December 21, 2017 at 16:48 #183614RaduModeratorHi,
The problem it’s because of this rule from the style.css
COPY CODEli#group-create-nav { display: none !important; }
You will have to remove the important, so the code will be
COPY CODEli#group-create-nav { display: none; }
Let me know
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionDecember 22, 2017 at 00:37 #183658graphiteParticipantIt works now, thank you Radu.
Merry Christmas 🙂December 22, 2017 at 04:10 #183666graphiteParticipantFor the record, it uses following on function.php:
<?php if ( pmpro_hasMembershipLevel(array(2,3))) { ?>
<style>
li#group-create-nav {
display: unset !important;
}
</style>
<?php } ?>December 22, 2017 at 16:12 #183693RaduModeratorHi,
Merry Christmass!
Great if it works
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.