• Resolved ikihinojosa

    (@ikihinojosa)


    My page still under construction yet (Coming soon mode) so that is why I’m not providing a link…
    
    I love your plugin first of all!!
    
    My question is: How can I remove button “Add document” from the Word press visual editor...
    
    The reason is that for the front end users I don’t want to give this option, and in my page they have access to other pages (classifieds ads for example) where they can see the visual editor as well.
    
    So I don’t want them to be able to insert documents from there.. (For the ads, only the add media button for the visual editor is what I need to have there).
    
    For adding documents I prefer to use the back end only
    
    Thanks in advance
    • This topic was modified 3 years, 4 months ago by ikihinojosa.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support vidyakv

    (@vidyakv)

    Hi @ikihinojosa,

    Thanks for reaching out to us.

    This is possible by adding a custom code snippet to your site. By default, the WordPress editor is only shown in the backend. Are you using any page builder plugin? or using any plugin to show the editor on the front-end?
    If yes, please let us know the plugin details so that we can provide the right code snippet after proper testing to remove the button from the editor.

    Regards,
    Vidya K V

    Thread Starter ikihinojosa

    (@ikihinojosa)

    `Hi… Thanks for the answer

    Yes my page will be about online courses, and in it there is a classifieds secction to sell, exchange or donate school products, also there is a frontend submision form for woocommere products

    All those parts show the editor to the users as they can type and write what they need

    Page was built on Elementor, (but many of the pages are made directly in to word press system, but using the classic editor)

    For the classifieds I used a plugin called Listdom, for the online courses I used Learnpress with an frontend add on editor they have, for the Woocommerce submission I used a plugin called “User Frontend plugin”

    Thanks in advance

    Thread Starter ikihinojosa

    (@ikihinojosa)

    Hi there!….

    any suggestions?

    Plugin Support vidyakv

    (@vidyakv)

    Hi @ikihinojosa,

    Please use the below code snippet for the above requirement.

    function awsm_ead_remove_add_button() {
    	if ( class_exists( 'Awsm_embed' ) ) {
    		global $pagenow;
            if ( ! is_admin() || ! in_array( $pagenow, array( 'post.php', 'post-new.php' ) ) ) {
    			remove_action( 'media_buttons', array( Awsm_embed::get_instance(), 'embedbutton' ), 1000 );
    		}
    	}
    }
    add_action( 'wp_loaded', 'awsm_ead_remove_add_button' );

    External Resources
    https://wp-content.co/add-custom-code-to-your-wordpress-websites/

    Regards,
    Vidya K V

    Thread Starter ikihinojosa

    (@ikihinojosa)

    Thank you so much vidyakv

    is working fine!

    Cheers…

    Plugin Support vidyakv

    (@vidyakv)

    Hi,

    Awesome! Happy we could help you out. Between if you have a moment, I would very much appreciate it if you could quickly rate the plugin on WordPress, just to help us spread the word.

    Regards,
    Vidya K V

    Thread Starter ikihinojosa

    (@ikihinojosa)

    Gladly did!

    Love it…

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to remove the button from the WordPress visual editor’ is closed to new replies.