Rewriting Shortcode into CSS Class

Hi,

I’ve been using the Memberpress plugin with X-Theme to create a membership site and have been applying shortcodes around individual elements so they show/hide from different members. I was wondering if it was possible to (and if so how I would) turn this shortcode into CSS code so I can apply it to a whole section at once using custom classes for a section (rather than doing it to individual elements as I have been)?? The current shortcode I’ve been using is as follows:

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

Thanks in advance for any assistance!

Hi There,

Altough I am not familiar with Memberpress, you could create a class (or use the classes that are already built in X) and add the class to <div> wrapping your content for example.

https://xthemetips.com/css-helper-classes/105/

Hope it helps

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