Tips and Tricks HQ Support Portal › Forums › WP eMember › WP eMember Tweaks › Hide product from membership but show for non-members?
- This topic has 4 replies, 3 voices, and was last updated 8 years, 11 months ago by wplove.
June 24, 2014 at 1:42 am #11062
eStore Version v7.0.9
eMember v.Version v8.8.8
I’m trying to display a list of member-priced and non-member-priced products that appear one way for logged in members of my “community” membership (level #2) and another way for non-members and logged-in users of any other membership (I have multiple memberships on my site.)
I’m using “protected for=2” tags to hide membership-priced products from the public like this:
[emember_protected for=2 do_not_show_restricted_msg=1][wp_eStore_fancy2 id=10][/emember_protected]
… and “not_for” tags to hide the non-membership-priced products from logged in members like this:
[emember_protected not_for=2 custom_msg=”This is hidden from member level 2 and public to everyone else?”][wp_eStore_fancy2 id=5][/emember_protected]
Yet the “not_for” tag seems to be hiding the regularly priced items from non-logged in users as well. Is there another tag that would better for what I’m trying to do?
I definitely want the regularly priced items to be visible to non-logged-in visitors.
You can see my demo page here: [http://dev.detoxtheworld.com/courses-estore/]
Thanks for the help.June 24, 2014 at 2:38 am #63880wzpModerator
Here are some proper examples of selectively displaying content to various users:
- Logged in VS not logged in:
- Not logged in VS various logged in levels:
All of these variations are documented here:
P.S. You should seriously consider updating your version of WP as well.June 25, 2014 at 3:35 pm #63881
Got it. So it looks like I’ll have to create three restricted criteria for each product:
1. Content that is displayed for not logged in users only
2. That same content that is displayed for logged in members but not for logged in members of my target “community” membership
3. content that is displayed for “community” membership only.
Not sure if I should create another ticket on this or not, but using the code I listed in my original issue, the “do_not_show_restricted_msg=1” does not seem to be working. The restricted messages are showing up in all cases. Any idea why this is not working?June 25, 2014 at 11:29 pm #63882adminKeymaster
The shortcode you have there with the “do_not_show_restricted_msg” parameter looks correct. I copied and tested that in my test install and it behaves correctly.
Can you please switch to the “Text” view of the editor to make sure there is nothing weird going on with that shortcode? Also, can you create a brand new test page and just enter that shortcode to see what it does.
You haven’t made any modifications to the plugin have you?June 26, 2014 at 8:19 am #63883
I checked out the “Text” view and found a whole bunch of extra open and close “code” tags. I did a fresh start like you suggested and that worked. So I took a look at what the code was supposed to look like and cleaned out the code for the ones that weren’t working. Thanks for the tip.
- Logged in VS not logged in:
- You must be logged in to reply to this topic.