latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

About: Eric Byrd

Sorry, I've not written a description yet. I'll get to it soon!


Topics I'm Subscribed To

Viewing topic 1 (of 1 total)
Topic Count Last Reply
S2Member Shortcodes in new OptimizePress v2

By:  Eric Byrd in: Community Forum

voices: 2
replies: 2

3 years, 4 months ago  Eric Byrd

Viewing topic 1 (of 1 total)

Topics I've Started

Viewing topic 1 (of 1 total)
Topic Count Last Reply
S2Member Shortcodes in new OptimizePress v2

By:  Eric Byrd in: Community Forum

voices: 2
replies: 2

3 years, 4 months ago  Eric Byrd

Viewing topic 1 (of 1 total)

My Latest Replies (From Various Topics)

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Wednesday Aug 21st, 2013 at 10:27 am #56357

Okay, so since I posted this I had the chance to play around a bit. I did get it to work, but not exactly as I wanted. So here’s the skinny for anyone else working with OP2.

OP2 has a page builder that requires you to add ‘elements’ to the page of different types. It basically handles the coding and CSS, etc for you. Nice if you don’t want to ‘code’ and the layouts are nice, I must admit (why I bought it).

I have been trying to use a conditional shortcode to protect a specific ‘element’ on a page by current user level. That way I don’t have to create multiple pages, plus it deals with the fact that higher levels can see lower level pages (level 3 can see level 2&1 pages by default). I want to put some text and buttons that only the current level user can see.

What didn’t work: I tried adding the shortcode as a “html/shortcode” element in the page builder above the button element I want to protect. It doesn’t accept the short code [s2If current_user_is_level1] at all. It just won’t add it. So I tried adding it as a text block element above the button element. It accepts it in a text block (and is hidden on the page as the tutorial says it might be). The problem was that when I wanted to end the protection with the [/s2If] shortcode, as another text element below the button element, the text “[/s2If]” shows up on the page… so it doesn’t recognize it as a shortcut.

What DID work: so I tried adding the shortcodes and the content as text all in one text box ‘element’ in the page builder. That works. So, that means you can only protect each element by adding the shortcodes into the element “box” itself. You don’t seem to be able to protect several elements with one overall shortcode. I was able to protect text and an s2Member PayPal button shortcode this way and it worked fine. I’m not sure about other graphic elements from the page builder… not sure how to insert the shortcode into those elements generated by the builder. But you can do basic html to add buttons and stuff if they need to be protected.

Oh, and word of warning… when you’re protecting elements. Make sure you put current_user_is(administrator) as one of the levels to see the protected content. I lost access to a button because I didn’t do that and it now doesn’t even show up in the page builder interface. I’m going to have to figure out a way to get it back or to recreate the page entirely. Ah, the ups and downs of page builders.

Thanks… hope that helps and if anyone figures out how to protect multiple elements with one shortcode I’d love to know about it!!

Viewing 1 replies (of 1 total)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.