Content hiding shortcodes

Hi

I use Paid Membershps Pro - but have also created some custom shortcodes to limit content to logged in vs non logged in viewers.

In the old days, it was easy to pop in the shortcode at the top and bottom of a big text / code section. Still works that way just fine - but with the new PRO system, I’m struggling to get a full wrap of content areas to hide them unless I code old school in a big text area.

I saw some posts about global blocks, but that just isn’t feasible for a site with 6k pages. What is the proper way to work this with the new theme system?

In a perfect world I could turn off Sections based on subscribers or non-subscribers with a checkbox.

Hi @bluedotproductions,

Thanks for reaching out!

If you want to show the shortcode at the top or at the bottom of the page. I suggest that you create a custom header or footer then you add the custom shortcode inside the builder. In that way, you can show them to all your 6k pages.

Hope that helps and let us know how it goes.

Thanks marc. I don’t think I explained this well. I have to wrap content to show / not show the sections created with Pro. The way that Pro codes with sections is great for DOM count, but how do I include the section within a shortcode that designates the ability to see the content to subscribers / non subscribers. Like this:

[show_subscribers]
Some amazing content they have to pay for.
[/show_subscribers]

Hello @bluedotproductions,

With the given shortcodes, it is no longer possible with the new builder. What you can do is to use the Section element condition option. You may add in the condition that the section will only display when the viewer is logged in and that he is a subscriber.

If you are not familiar with the Element Conditions, please check out this documentation:

Kindly let us know if this has worked out for you.

You guys rock. With each new version, I am learning new techniques to develop - and this too is a new concept! I’ve been with Themeco since X 3.0.

I checked in with Paid Memberships Pro, and they have a snippet that will set users with membership lapses to a different user role. Then, they can still login and update their account (and it then sets them back to subscriber) but content can be hidden by use of WP role instead of the shortcodes we used before. Yay!

Hi @bluedotproductions,

Great! If you have any other concerns or clarifications regarding our theme features, feel free to open up a new thread.

Thank you.

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