• I’d like to show some buttons on a page depending on the access level of the logged in user.

    I added [restrict subscription="9"]Button here[/restrict] and [restrict subscription="10"]Button here[/restrict] shortcodes and found 2 issues:

    1. The default message (the message set under Settings > Restricted content message) is displayed each time the shortcode is used
    2. The excerpt/snippet of the page is shown each time the shortcode is used

    I can work around 1 by adding the attribute message=” ” (space) since the default is only used if the message in the shortcode has a zero length. I cannot get around 2, because I have “Always show snippets” set because 99% of the time, the snippets should be shown for content and I can’t reasonably expect publishers to always remember to tick the box for every post they publish. Not only that, but I restrict content at category level, so I don’t even have the ability to enable the snippet per post when using RCP in this way.

    Is there a way, or could there be a way, to turn off the snippet when using the restrict shortcode or is there a better way to achieve this?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support jkleinithemes

    (@jkleinithemes)

    Hi. By snippet are you referring to one of the “use-as-is” snippets we offer here or is this something else?

    Thread Starter jamieburchell

    (@jamieburchell)

    @jkleinithemes I’m referring to the post content excerpt.

    Plugin Support jkleinithemes

    (@jkleinithemes)

    Thanks for the clarification. There isn’t anything within core Restrict Content that will do this. It may be possible to do this with custom code. We do not provide support for custom code, however here is a link to our developer documentation: https://restrictcontentpro.com/dev-docs/

    Thread Starter jamieburchell

    (@jamieburchell)

    I ended up creating a custom restrict shortcode, but this is not ideal because it copies most of the functionality of the original with a couple of additions. It would have been better to be able to hook in to the function to extend it, but alas that code is written in such a way that makes it imposible.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Turn off snippet when using restrict shortcode?’ is closed to new replies.