Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #452482

    Hello dear support team,

    I want to remove certain Shortcode Elements for my client’s blog.
    I don’t want to confuse the authors so I want to display only the shortcodes I have adapted to their design.

    For example I want to disable/hide the ‘av_dropcap1’ and ‘av_dropcap2’.
    How is it possible to deactivate these on both editors. Most important in the post’s default editor where the Magic Wand is displayed.

    Thanks in advance for your help!

    • This topic was modified 9 years, 5 months ago by jensvolker.
    #453261

    Hey jensvolker!

    Please go to enfold/config-templatebuilder/avia-shortcodes and remove those elements.

    Cheers!
    Yigit

    #453640

    Thanks for that hint Yigit,
    but can i as well deactivate it in the child themes function through a script snippet?
    Would prefer that so we would be able to update without effort. We have changed a lot on our first enfold blog so I want to avoid running into that update problems again.

    Thanks for your great support :)

    #454117

    Hi Yigit, I’d like to know the answer to this as well.

    Also, is it possible to remove elements by user role (eg, hide certain elements in the layout builder for Editors, but show them for Admins)

    Thanks
    Dunc

    #454637

    Hey!

    See here, http://kriesi.at/documentation/enfold/add-new-or-replace-advanced-layout-builder-elements-from-child-theme/.

    As for changing them depending on the user it’s possible but I don’t think it would be feasible to do it in a child theme though. Not unless you were wanting to hide them with CSS. In that case you could try something like this.

    add_action( 'admin_print_styles', 'enfold_customization_admin_css' );
    function enfold_customization_admin_css() {
    	echo '<style type = "text/css">';
    	echo '#mceu_63 { display: none; }';
    	echo 'a[href="#avia_sc_button"] { display: none; }';
    	echo '</style>';
    }

    That code would hide the button shortcode in the layout builder and in the magic wand icon. If you wanted to hide it only for certain users then you could try using the “current_user_can” conditional, https://codex.wordpress.org/Function_Reference/current_user_can, to check if the user has certain capabilities.

    Regards,
    Elliott

    • This reply was modified 9 years, 2 months ago by Elliott.
    #459295

    Thank you for your help, we already have added several shortcodes with
    the setup described in your link but now the task would be to remove certain ones …

    I will definitely not be able to hide the magic wand icons via CSS. Because I have tried it already and :
    I experienced that the magic wand icons do not have a unique ID like #mceu_63 … the same shortcode menue item will have a different IDs on different posts.

    Therefore i will have to remove it via PHP … any ideas?

    • This reply was modified 9 years, 5 months ago by jensvolker.
    #460136

    Hi!

    actually I think the magic wand icon does have a unique ID: #mceu_15
    and using Elliott’s php code you will achieve what you want I think.

    Best regards,
    Andy

    #479179

    Hello,

    after several research, i found this post.

    I try to basically doing the same thing : hide boutton in the admin bar when you write a page.

    This code works perfectly for hidding the “button” widget.

    add_action( 'admin_print_styles', 'enfold_customization_admin' );
    function enfold_customization_admin() {
    	echo '<style type = "text/css">';
    	echo '#mceu_63 { display: none; }';
    	echo 'a[href="#avia_sc_button"] { display: none; }';
    	echo '</style>';	
    }
    

    But I can’t find out where is the list of unique ID. There is one ?

    When i add this, nothing else hidding.

    add_action( 'admin_print_styles', 'enfold_customization_admin' );
    function enfold_customization_admin() {
    	echo '<style type = "text/css">';
    	echo '#mceu_63 { display: none; }';
    	echo '#mceu_64 { display: none; }';
    	echo 'a[href="#avia_sc_button"] { display: none; }';
    	echo 'a[href="#shortcode_insert_button"] { display: none; }';
    	echo '</style>';	
    }
    

    So i want to know where i can find the unique ID list and hidde other button in the admin bar.

    Regards,
    Loïc

    • This reply was modified 9 years, 2 months ago by Elliott.
    #480244

    Hi!

    You’ll just have to right click and view the page source to see the IDs. What elements are you trying to hide?

    Regards,
    Elliott

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.