Using Memberpress Shortcodes to Hide X Sections

Hey There,

I am hoping that someone here might have some experience using the app memberpress.

Basically, the app allows you to restrict pages on the site so that it is only accessible to users that are assigned access through the apps member section.

What I am trying to do though is to restrict cornerstone sections depending on a selected user that is logged in. The app has a rule that I can use to set the function of this up and then by using a shortcode from the memberpress app I can wrap that around a paragraph for example that then completes the rule set within the app.

The issue is that I cannot find any way to wrap this around an entire section or row within cornerstone…

Does anyone know how I can get this to work? The main thing with the shortcode is that it has a opening and closing part and without both it wont work… so I cannot add it anywhere in the CSS parts in any way that seems to have the desired effect. I also tried to put the opening of the shortcode into raw text before the section and the closing in the end of the section but still does not have the desired affect.

Here is an example of the shortcode:

Shortcode: [mepr-show if=“rule: 143”] This content is shown only to authorized members. It is hidden from everyone else. [/mepr-show]

Any light would be appreciated :smiley:

Hi @entechnico,

Thanks for reaching out.

Unfortunately, that’s not currently possible. What you could only wrap are the contents within the text element, which means your shortcode should be added through that element.

But, I may add this as a feature request.

Thanks!

Hey Rad!

Thanks heaps for your reply. I have tried to do it that way but it is not working to put a text element on both sides of the content that I am trying to apply the shortcode to but this is not working. I suspect that it is because the opening and closing is within a seperate tags.

The only thing that works is for me to just build the row like I want it to be and then take the source code and apply that entire row code to a new one with the shortcode wrapped in that… that works but it causing other issues with the styling, not sure why. For example, when I do that, regardless of grabbing the whole div it is not applying the centre and text colour, even though it has the correct X div class…

That is ok though, I understand that it is not supported but would be really awesome if something could be implemented in the future :smiley:

Hello There,

Copying and grabbing the shortcode may not always work because the css of the divs or other elements might have been overridden by other elements. It will always give you a have time modifying or implementing what you want to do. And yes this is already in our feature request list.

Thank you for your understanding.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.