Support » Plugin: Profile Builder - User Profile & User Registration Forms » Right way to restrict content

  • Resolved dannyogolo

    (@dannyogolo)


    I wad directed here because I asked similar question in your other plugin.
    Here is what I want to achieve

    I have a page where I jave some premium content

    I want to wrap part the content into 3 parts with shortcodes

    Part 1 – Seen only by visitors (who are not logged in)
    Example = This content is available only to our VIP members. Click here to Login or sign up.
    (Then they sign up and confirm it from their email address)

    Part 2. Seen by logged in Subscribers
    Example = This content is available only to our VIP members. Click here to Login or sign up.
    (Then they sign up and confirm it from their email address)

    Part 3. Seen by logged in users with custom custom user role which I want to create. So even if the custom user role is a clone of sunscriber abilities, I just want them different from subscribers (meaning I may have to manually assign them). If your plugin cant create a custom user role, I can do so with another plugin.
    (The other content above is hidden from logged in VIP user role members)

    Thanks

Viewing 1 replies (of 1 total)
  • Plugin Support alexandrubodea

    (@alexandrubodea)

    Hi @dannyogolo,

    Part1:

    To achieve this you will have to use the [wppb-restrict display_to=”not_logged_in”] [/wppb-restrict] shortcodes.

    Example:

    [wppb-restrict display_to=”not_logged_in” message=” “]
    This content is available only to our VIP members. Click here to Login or sign up.
    [/wppb-restrict]

    The above text will be shown only to logged-out users

    You can read more about this here: https://www.cozmoslabs.com/docs/profile-builder-2/shortcodes#Display_content_only_to_logged_out_users.

    Part2:

    A workaround for this will be to only display this message to the subscriber user role (or the user role that your non-VIP users have)

    Example:

    [wppb-restrict user_roles=”subscriber” message=” “]
    This content is available only to our VIP members. Click here to Login or sign up.
    [/wppb-restrict]

    You can read more about this here: https://www.cozmoslabs.com/docs/profile-builder-2/shortcodes#Restrict_Content_based_on_User_Roles

    Part3:

    It’s like the one above but this time you will select the user role that your VIP users have

    Example:

    [wppb-restrict user_roles=”vip” message=” “]
    You’re a VIP Member.
    [/wppb-restrict]

    Please test the above to check if it works how you desire

    Note: You can create custom user roles by using the Roles Editor functionality. In the first place, you will have to activate this functionality by going to your Dashboard -> Profile Builder -> General Settings -> Roles Editor.

    After which you can go to your Dashboard -> Profile Builder -> Roles Editor.

    Best regards,

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.