Popup Maker Is Overwriting My Menu Editor Functions - How Can I Fix This?


In special circumstances, the changes your theme makes to the default WordPress Nav Menu Editor can cause issues.


Symptoms include missing Menu Editor functionality (implemented by your theme or a plugin) that was there before Popup Maker was installed on your site.


WordPress core doesn’t include a way to add Custom Fields to the Menu Editor. However, they do allow overriding a PHP Class that is used to create the Menu Editor. The problem is that only one plugin/theme can do this at a time.

The most common solution is to simply copy the core WP class and add your Fields where they would go. This means that when another plugin tries to add Fields by replacing the Class that WP uses, the first Field that was there now no longer appears.

Our solution was created a few years back and will work with dozens of plugins modifying the Menu Editor. It is currently used in roughly 30 plugins on the Wordpress.org repo and dozens of themes, as well as a lot of premium plugins on Code Canyon. It only makes one change to the Class used to override the core one, it adds a hook/action so that we can add Fields via add_action, and others can do the same.

We recommend trying to reach out to your theme author and getting them to update their code, which is a much better solution because it will then allow users of these themes to also use other plugins such as  User MenusNav Menu RolesIf Menu, plus many more.

The solution has also been tested all the way back to WordPress v3.0 and works with any version all the way up to the most current versions due to lots of testing for maximum backward compatibility.

Solution #1

Disable the Popup Maker Menu Editor:

1. Navigate to Popup Maker > Settings from the WordPress Admin.

2. Click the Misc Tab.

3. Check the Disable Popups Menu Editor Feature at the bottom of the list.

Solution #2

1. Replace your current  wp_edit_nav_menu_walker filter with the one below. Correct paths for your needs.

2. Include the following files/classes to your plugin into the paths from the function above. Do not rename the classes, there are ample checks to prevent them from being reloaded if they exist already. Keeping these names ensures long term compatibility for all plugins using them.

3. Move your custom Nav Menu Editor fields (without modification) to a new function hooked as seen below.

4. As a bonus, you can include an option to show/hide specific fields the same way WP Core does in the Nav Editor.