1. Home
  2. Snippets
  3. Remove “Add Form” button from TinyMCE editor

Remove “Add Form” button from TinyMCE editor

Heads up!

This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.

For extra guidance, please see WPBeginner's tutorial on adding custom code.


When WPForms is installed, an Add Form button will display in the TinyMCE page/post editor options for WordPress if you are using the Classic editor.

Add form button in TinyMCE editor

This button can easily be removed by adding the code snippet below to your site.

In this specific example, we’re hiding the Add Form button on pages and posts. However, you can replace page and post with any post type name.

 * Remove the 'Add Form' WPForms TinyMCE button.
 * In the function below we disable displaying the 'Add Form' button
 * on pages and posts. You can replace 'page' and 'post' with your desired post type.
 * @param bool $display
 * @return bool
function wpf_dev_remove_media_button( $display ) {

	$screen = get_current_screen();

	if ( 'page' == $screen->post_type || 'post' == $screen->post_type ) {
		return false;

	return $display;
add_filter( 'wpforms_display_media_button', 'wpf_dev_remove_media_button' );
Updated on June 19, 2019

Was this article helpful?