Hi Frizzel,
The shortcode tags you mentioned have not been designed to hide Elementor sections and that’s why they don’t work.
??? The shortcode tags I mentioned ARE designed to not just ‘hide’ but instead ‘not load’ content in between. What you are saying is that Elementor does not support this (at least the [/close] tag). That’s a big difference, and to be honest quite an unsatisfactory answer.
But, as a suggestion: why not have the Elementor option of hiding a section make it ‘do not load this section’ instead of ‘display:none’? I mean, if you want to hide it, you obviously don’t want to load it.
-
This reply was modified 8 years, 5 months ago by
frizzel.
@frizzel I don’t think you understand the underlying code and how Elementor is rendered which is different than wp_content that those shortcode wrappers would have an effect upon. But I understand your frustration and what you are intending to do.
I also had to devise a way for the Paid Memberships Pro free membership plugin to also allow disabling of showing (and loading) of Elementor designed content otherwise a sign-up/login message was provided on member-only post/products/pages. Here is the example – https://gist.github.com/pingram3541/831aecf628165b5f36f856303b23b5be
Alternatively you could approach the shortcode author and ask them kindly to consider reading this thread and modifying their plugin to also recognize Elementor content in some fashion, maybe by adding a special class to a section, column or element will hide it as per your needs.
Best of luck and success to you!
[edit] I felt I should add just a small opinion about plugin adaptation. I personally feel it is more logical for the feature plugin such as shortcodes and widgets and the like, more appropriately adapt their code to support the small number of popular page builder plugins vs the other way around. It reduces everybody’s support efforts and envelops trusted plugin groups when developers know they all work together, they will continue using them together on a greater number of sites they build. On the flip, it would be an impossible task for Elementor to adapt to the bajillion feature plugins that exist out there not to mention the 50k here @ ww.wp.xz.cn.
-
This reply was modified 8 years, 5 months ago by
pingram.
A better and simpler example than above (which would modify core and may not even be up to date) – this one is also for Paid Memberships Pro but is easily added to a theme’s functions.php, you could dissect and mutate as needed for your purposes – https://gist.github.com/matipojo/2a56dcf482a3ab9482610a93653c1116
@philip Ah yes, I see what you mean by the plugin targeting wp_content which indeed wouldn’t work with Elementor. I understand what you are doing in supplied code. However, the section blocks I wanted to not load have varying content. So, I decided to save them as Elementor templates and then conditionally call them in the post type template used.
Thank you for your help and suggestions.