Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #552944

    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.

    #553519

    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

    #553827

    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 :)

    #553829

    Hi!

    Yes :) Great!
    Glad Rikard could help! Let us know if you have any other questions or issues!

    Regards,
    Yigit

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Disable Advanced Layout Builder elements from Child Theme’ is closed to new replies.