Insert a shortcode in a template

I'm trying to insert a shortcode into the template, the shortcode itself seems to work, although the silent attribute and msg attribute doesn't work.

Furthermore, I see that the id attribute is required, but what if I want to show/hide to ALL subscribers? I can't list all the ID of registered members, it seems to work without that id attribute.

  • Dimitris

    Hello there Roberto,

    hope you're doing good today! :slight_smile:

    As you can also see in
    /wp-admin/admin.php?page=membership2-help&tab=shortcodes
    the [ms-protect-content] shortcode has a required id argument, which is for:

    One or more membership IDs. Shortcode is triggered when the user belongs to at least one of these memberships

    So you do have to use an ID in your custom code and additionally this isn't the ID of member(s), but the ID(s) of your membership level(s) that will have access to this part.

    You can find the ID of a membership level, by inspecting URL address bar while editing it. Example:

    Please do make above change and let us know about your results! :slight_smile:

    Thank you,
    Dimitris

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.