• Resolved srcasey

    (@srcasey)


    I have a page that has shortcodes for GamiPress for Social Media sharing.

    I need to hide those shortcodes for only Subscribers to the website.

    My code:
    [restrict …]

    [gamipress_social_share alignment=”left” twitter=”yes” twitter_pattern=”{title} on {site_title}” twitter_count_box=”vertical” twitter_button_size=”medium” facebook=”yes” facebook_action=”like” facebook_button_layout=”standard” facebook_button_size=”small” facebook_share=”no” google_plus=”yes” google_plus_button_annotation=”bubble” google_plus_button_size=”tall” google_plus_button_recommendations=”no” linkedin=”no” linkedin_counter=”top” pinterest=”yes” pinterest_thumbnail=”https://upload.wikimedia.org/wikipedia/commons/0/08/Pinterest-logo.png” pinterest_round=”no” pinterest_tall=”no” pinterest_count=”none” pinterest_description=”{title} on {site_title}”]

    [/restrict]

    However, there seems to be no way to restrict the view of the Social Media sharing icons to only subscribers. When I toggle the user level to only Subscribers the entire page is hidden instead.

    I do NOT wish to pay for another advanced plugin for this simple task.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @srcasey ,

    You can use the [restrict] shortcode, as you’ve shown above, or you can use the meta box settings. You do not need to use both. In fact, for what you’ve described, you’d want to leave the meta box portion unrestricted.

    So this part: https://ps.w.org/restrict-content/assets/screenshot-2.png should not have any restrictions added.

    Then in your shortcode, use [restrict] around the content you want to protect. (You don’t need the ... in your code, by the way, so change that to [restrict].

    Thread Starter srcasey

    (@srcasey)

    Thank you! Turns out that I was testing it incorrectly but I went ahead and removed the “…” also.

    Thanks again.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Restrict certain shortcodes’ is closed to new replies.