Hello GeoDirectory –
I’m using Memberpress on my website, to control what content users can see.
I only want “Resident” users (as opposed to non-residents or guests) to be able to leave reviews, or to be able to read the reviews that are posted.
To do that, I need to be able to insert a custom shortcode into the Geodirectory review area. I want all users to be able to see the businesses, but only residents to see the reviews.
The codes look like this:
Shortcode MEPR-SHOW:
[mepr-show if=”rule: 32171″] This content is shown only to authorized members. It is hidden from everyone else. [/mepr-show]
Shortcode MEPR-HIDE:
[mepr-hide if=”rule: 32171″] This content is shown to everyone except authorized members. [/mepr-hide]
PHP Snippet (This is similar to the first shortcode, but is used in places where shortcodes don’t work):
<?php if(current_user_can(‘mepr-active’,’rule: 32171′)): ?> Content to protect goes inbetween. <?php endif; ?>
So I need to put the first shortcode pair around the reviews, and then also put in the second shortcode pair around text saying “Only Skidaway Island residents can post or read reviews.”
Do you know how I can do that?
Do I need to create a child function for the plugin?
Thanks for your suggestions.
-James