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


    In de wysiwyg editor you’ve got two buttons for inserting shortcodes. The magic wand button to insert theme-shortcodes and a second button with the Woocommerce shortcodes.

    How can I hide the two buttons for anyone with a role of non-admin?

    Thx for the support.



    Hi Grtz,

    You may be able to do that with a plugin but I don’t know of a way to modify the visual editor based on user level.




    Hi Devin,

    After some searching and thinking I found a solution to hide both buttons (woocommerce and propulsion theme button) in the wysiwyg-editor for non-admins by placing the following code in the functions.php file in the theme directory:

    if (!current_user_can(‘administrator’)) {

    function custom_mce_editor( $init ) {

    $init = ‘scn_button,woocommerce_shortcodes_button’;

    return $init;}

    add_filter(‘tiny_mce_before_init’, ‘custom_mce_editor’);


    Perhaps this information may also be useful for others.




    Glad you found a working a solution and thank you for sharing:)

    Let us know if you have any other questions or issues.



Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Hide Woocommerce button en magic wand button in tinymce editor for non-admins’ is closed to new replies.