Is it possible to hide some of the content elements in the Avia Layout Builder?
Cheers,
Jan-Willem / Sowmedia
Hey Sowmedia!
You can add some CSS in /enfold/config-templatebuilder/avia-template-builder/assets/css/avia-builder.css. For example here is some CSS to hide the button element.
a[href="#avia_sc_button"] {
display: none;
}
Though I’m not sure why you would want to do this.
Cheers!
Elliott
In Addition to Elliots solution, there is an easy way to remove it programmaticaly (thereby really removing a shortcode).
This example removes the button shortcode:
function remove_shortcodes() {
/**
* Array of shortcodes you want to remove
* The values of this array should match the shortcode under which the elements are registered
* Usually, you can find them in your shortcode files under $this->config['shortcode'].
*/
$shortcodes = array('av_button');
/**
* Accepts an array of shortcodes and whether to remove these shortcodes (true) or not (false)
*/
if( class_exists('ShortcodeHelper') ) {
ShortcodeHelper::allowed_shortcodes($shortcodes, true);
}
}
add_action('init', 'remove_shortcodes');
However, this does not work in all contexts, so make sure to hook the function on init (or later)
Hi!
I’m not sure what would be the purpose of doing that, in what context would you use code like that?
Cheers!
Rikard
There might be situations where you (or a certain user of your site) need only half of the content builder elements, and the complete content builder with all of the amazing elements is somewhat too overwhelming to a certain group of users. By limiting the amount of options, the mental ‘stress’ on the abundance of options is reduced, thereby improving the usability for a certain group of users. While this is an uncommon situation, it occurs in client practice.