Attributes/Options WYSIWYG not working

Support MB Builder Attributes/Options WYSIWYG not workingResolved

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #14571
    lighterdayzlighterdayz
    Participant

    I'm trying to remove the Media Upload button from the editor using a frontend form. The field attributes linked to documentation: https://codex.wordpress.org/Function_Reference/wp_editor

    Using MB Builder with this code:

             array (
                    'id' => 'wysiwyg_6',
                    'name' => 'WYSIWYG Field',
                    'type' => 'wysiwyg',
                    'options' => array(
                        'media_buttons' => false,
                    ),
                ),

    Result is: https://www.screencast.com/t/alRtjJOzaX1

    What do I need to do to make the button disappear on frontend?

    Thanks in advance!

    #14579
    lighterdayzlighterdayz
    Participant

    User error, working fine.

    #37490
    13Garth13Garth
    Participant

    Please could you add an answer to your post because I am having the same issue but I see no solution to your problem.

    Also I am not doing the post type in the code. I am using the UI. So where can I configure to remove the media box?

    #37491
    13Garth13Garth
    Participant

    -- Mistake re-posted same question.

    #37492
    13Garth13Garth
    Participant

    This is how you can remove your media from post editor and also the text tab where people can add html code.
    Note!!! This will disable these options across the board. So if you need it to be post specific. Go find another solution.

    Also I hope you have a child theme or else you are cutting corners and your stuff
    will likely break with updates for your theme.

    Paste the below code into your functions.php file inside your theme folder.

    add_filter( 'wp_editor_settings', function($settings) {
    $settings['media_buttons'] = false;
    $settings['quicktags'] = false;
    return $settings;
    });

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