I understand the concept of shortcodes but I need to know exactly what to write in the “Shortcode protected content” section. If I want to restrict pages from the free members but be only for the paid members, how would I write that in brackets?



  • Paul Barthmaier
    • Code Wrangler

    Hi Joe,

    The shortcodes in Membership are used for when you want to restrict stuff on a given page, but otherwise have the page available. The shortcodes wrap the stuff that you want to protect like bookends. For example, if you wanted to not give access to a page called Friends, as in htrp://yourdomain/friends, you could just select the page Friends in the Membership negative rule and this would apply to everyone in whatever level you have applied that rule to. By the way, if you network-activated the plugin, you’d have to use a URL group since you won’t see a particular page in the network admin dashboard.

    But going back to your original question, say you had two type of members, Aliens and Martians, and you want to say something to each. You can’t restrict the whole page since you can’t you want them each to see parts of it. This is where the shortcodes come in handy. You might want to say something like:

    Earthlings are such a peaceful sort. They embrace all types and love everyone, especially Martians and Aliens.

    [level-martians] Of course, Martians, you know that we prefer you more since who knows where those aliens come from anyway![/level-martians]

    [level-aliens] Of course, Aliens, you know that we prefer you more since those Martians heads are so big, and their eyes are kinda beady and stuff. [level-aliens]

    We know that we can all live harmoniously in this galaxy.

    So in the above, what’s is in normal font, everyone will see, what is bolded only the Aliens will see and what is italicized, only the Martians will see. Make sense?



Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.