Membership content locked doesnt appear at my home for non logged users

hello guys, i hope you can help me

in my website homepage, i have some modules of content...to show my latest and my featured content.. but, when i lock a content only for membership users.. those content that are locked does not appear at my home, when i access logout.

i`d like only to protect the content... i need to show this content in my home for everyone (logged in or logged out)

can you help me?

  • Adam Czajczyk

    Hello thiago,

    I hope you're well today and thank you for your question!

    Such content shouldn't show up (in a standard WP Loop) for non-logged in users "by design" if it's been protected using either "Membership 2 -> Protection Rules" or protection toggle switches on page/post edit screen.

    You can overcome this by using shortcodes instead. The general rule would be like this:

    - remove current protection from the post/page
    - edit that post/page
    - enclose some part of content with [ms-protect-content id="X"] ... [/ms-protect-content] shortcodes (where X is a numerical ID of membership); you'll find these shortcodes on "Membership 2 -> Memberships" page.

    This way you can make sure that only titles or e.g. titles and some "lead"/part of content is visible but to be able to access the rest of it, user would have to be a registered and logged in member; it would act similar to some "paywalls" that hide part of the article until you are a paid subscriber :slight_smile:

    Best regards,
    Adam

  • thiago

    Ok Understood!

    My membership ids are:
    [ms-protect-content id="802936"][/ms-protect-content]
    [ms-protect-content id="801852"][/ms-protect-content]
    [ms-protect-content id="802036"][/ms-protect-content]
    [ms-protect-content id="802037"][/ms-protect-content]
    [ms-protect-content id="803051"][/ms-protect-content]
    [ms-protect-content id="803052"][/ms-protect-content]

    My question: How do i insert all these ids in only one shortcode?
    and how proceed with this shortcode, i insert this after my first parahraph, and close the shrotcode after the content?

    When i did this i could only see a message that shows "content exclusive to members"... my second question: how do i insert a buy button or something like that with these shortcodes?

    thanks for your attention

  • Dimitris

    Hey there thiago,

    hope you're doing good and please excuse our late response here! :slight_smile:

    You can set multiple IDs, separated by commas, to wrap some content, for example:
    [ms-protect-content id="802936,801852,802036,802037,803051,803052" silent="yes"] Only members of these memberships can see this![/ms-protect-content]

    You can find the complete instructions set for all shortcodes in Membership 2 -> Help -> Shortcodes admin page.

    Warm regards,
    Dimitris