Tagged: advanced layout builder, snippet
Hi,
I am trying to disable some elements in the Advanced Layout Builder from my Child Theme.
I used this Snippet : http://kriesi.at/documentation/enfold/add-new-or-replace-advanced-layout-builder-elements-from-child-theme
For example, I want to disable the “code block” element.
So, I added the snippet into the functions.php from my child theme file and created a “codeblock.php” file in the shortcodes folder.
My own codeblock.php file looks like this :
<?php return;
But the element is still there in my Layout Builder.
The “return” code works if I edit the original “codeblock.php” file from the Enfold theme.
Thanks for your help.
Hey objectif-multimedia,
Not sure what are trying to do there, are you just trying to disable them? If so it might be easier to achieve with CSS, would that work for you? Please send us a temporary admin login so that we can have a closer look. You can post the details in the Private Content section of your reply.
Thanks,
Rikard
Hi,
You’re telling me to do something like this ?
add_action( 'admin_print_styles', 'enfold_customization_admin' );
function enfold_customization_admin() {
echo '<style type = "text/css">';
echo 'a[href="#avia_sc_codeblock"] { display: none; }';
echo '</style>';
}
It actually works :)