- This topic has 4 replies, 2 voices, and was last updated 1 year, 10 months ago by .
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- You must be logged in to reply to this topic.
WordPress Membership Plugin
Simple Membership Plugin › Forums › Simple Membership Plugin › How to combine more than two shortcode commands?
I want to restrict content to users who are not logged in and to users who are logged in but have a few specific membership levels. How can I do this?
Here is what I set:
“[swpm_protected for=“2-12” visible_to=“not_logged_in_users_only” custom_msg=’abc’]
test content
[/swpm_protected]”
Result:
1. ‘test content’ was visible to not logged in users, but custom_msg did not work.
2. level-2 (logged in user) and level-12 users should have seen ‘test-content’ but did not when they loggin.
What is the solution?
Thanks.
You are trying to do this?
Using a Custom Message for the Non Members
https://simple-membership-plugin.com/apply-partial-section-protection/#using-a-custom-message-for-the-non-members
Thank you for kind reply. Unfortunately, it is not. I wrote what i want to combine two or more than two conditions again:
Currently, i set like these:
1.
[swpm_protected for=“2” custom_msg=’this is custom msg’]
content message
[adinserter block=”1″]
[/swpm_protected]
2.
[swpm_protected visible_to=“not_logged_in_users_only” custom_msg=’this is custom msg’]
content message
[adinserter block=”1″]
[/swpm_protected]
However, I hope to combine two into one short codes like this:
[swpm_protected for=“2” & visible_to=“not_logged_in_users_only” custom_msg=’this is custom msg’]
content message
[adinserter block=”1″]
[/swpm_protected]
Unfortunately, the combined order what i tried does not work. Could you give me an solution?
Thanks.
You cannot combine more than one condition is the same shortcode. SWPM (and WordPress) only allows single condition IF/THEN blocks. This is a hard restriction.
I see. Thanks!