• Resolved ofeksit

    (@ofeksit)


    Hello!
    I’m using this plugin and would like to restrict content to specific role in my website, but once I’m trying to write this shortcode on page, it’s not working for some reason.
    If I try to write this in post, it works well.

    My code:
    [content_control roles="administrator"]Special info for Administrator only[/content_control]

    Thanks!

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support mark l chaves

    (@mlchaves)

    Hey @ofeksit,

    We’re definitely not seeing any issues on our side.

    We copy/pasted the exact shortcode you shared into WordPress’s default Sample Page.

    https://share.wppopupmaker.com/QwunvLbo

    Here’s the result.

    https://share.wppopupmaker.com/yAu1GKPy

    Top half: Logged in as an admin we see your “Special info for Administrator only” content.

    Bottom half: Not logged in we see our custom denial message.

    Can you tell us more about what you mean by “it’s not working”? I.e.:

    1) What happens when you visit a page while not logged in and when logged in.

    2) Are you using a separate incognito or private browser window when you test the *NOT* logged-in case?

    3) Are you sure you’re logged in when you test the logged-in case?

    4) Have you cleared all of your caches?

    I Make Changes and Nothing Happens

    5) Have you ruled out a theme or plugin conflict?

    https://gist.github.com/marklchaves/90f5af8d0ea08d6e54254f2afb1109df

    6) Are you sure you’re adding your shortcode into a shortcode block or the text tab in the classic editor?

    If you’re still seeing the issue and want hands-on help, can you submit a ticket via our contact form?

    https://code-atlantic.com/contact/

    That way we can get more details from you and take a closer look.

    Cheers!

    • This reply was modified 4 years ago by mark l chaves. Reason: Added contact form link

    Hello Mark,
    I created a clean sample wordpress website and:
    1. Installed and activated the content_coontrol plugin
    2. Created a page as ofeksit. This is page name ‘Page restricted for administrator’
    The text on that page is: [content_control roles=”administrator”]Special info for Administrator only[/content_control]

    There is no request for login if I browse to that site without a login. Even more I see the ‘Special info for Administrator only’.
    You can try it yourself at https://quovadis.cloudaccess.host
    Thanks for the help.
    Herman

    Plugin Support mark l chaves

    (@mlchaves)

    Hey @hermanhenskens,

    We don’t see your

    “Special info for Administrator only”

    content when we visit your page. Here’s a recording.

    https://share.wppopupmaker.com/7Ku6nkWj

    It looks like the Content Control shortcode is working fine for us. You might want to add a message parameter as another test. Check out examples 2 and 3 here.

    https://gist.github.com/marklchaves/230ba030334d9f3984cedd71e1dc9193

    If you’re not seeing your changes, have you tried clearing all of your caches or testing on another computer?

    I Make Changes and Nothing Happens

    If you’re still not seeing any changes, are you seeing any JS or PHP errors? How about DB errors? Are your PHP vars meeting minimum WP specs for your theme (check your theme’s docs)?

    Also, the shortcode doesn’t do a redirect. You’ll need to add a restriction rule and select the redirect protection for that.

    https://share.wppopupmaker.com/L1uWxd4g

    Let us know if we missed anything.

    Cheers!

    P.S. This thread is closed. So, please start a new one if you have any more questions or run into any issues 😉

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Plugin isn’t working on pages’ is closed to new replies.