Categories
Code Snippets Ninja Forms

Remove Ninja Forms ‘Add Form’ Button

Want to remove that annoying “Add Form” button added by Ninja Forms above your WYSIWYG editor in WordPress? (A common issue if using Advanced Custom Fields – ACF plugin)

The Add Form button added by Ninja Forms appearing above the WYSIWYG editor

The code you need

add_filter('ninja_forms_hide_add_form_button', '__return_true'); // disable Add Form button on WYSIWYG

Where to put the code

Add the code to your active theme’s functions.php

If you’re using WordPress multisite and wish this applied across all sites on the network:

  • Create a file at wp-content/mu-plugins/ninja-forms-custom.php
  • Add the code above to this file

If you’re using WordPress multisite and wish this applied on some sites on the network:

  • Create a basic plugin with this code
  • Enable the plugin only on the sites you wish this applied to.

How it works

  • Hooks into the ninja_forms_hide_add_form_button filter
  • Uses WordPress’s built-in __return_true() helper function to set the value of ninja_forms_hide_add_form_button to true