Where to integrate: Locate Theme Template Backtrace

Since v3.6

UberMenu Control Panel > General Settings > Theme Integration > Locate Theme Template Backtrace

The Locate Theme Template Backtrace feature helps you locate which theme template contains the theme’s menu code that needs to be replaced when manually integrating the menu. In many themes, this is just the header.php, but in more complex themes it may be buried in a sub-template or other theme file.

A “backtrace” shows a sequence of functions calls and their locations within the code files. This allows you to see all the possibilities for where the relevant code in the theme may be located.

How to use the Backtrace

Note that you will need to have UberMenu already displaying on the site for this to work. The common scenario is that you’ve used automatic integration, but there is theme interference – so UberMenu is displayed, but incorrectly.

In the Control Panel > General Settings > Theme Integration, enable the Locate Theme Template Backtrace setting.

When you enable this setting, then view the front end, administrators will be shown a notice above UberMenus on the site (normal site visitors and non-admins will not see any notice).

The notice will list a backtrace of theme templates called. Check these templates in this order, looking for the appropriate code that needs to be replaced. The first template listed should contain the wp_nav_menu() call, and in most cases this will also contain the wrapper that needs to be replaced.

Important: UberMenu display required

Please note, the message only appears above UberMenu instances – that is, you must have the menu integrated (generally, via Automatic Integration) in order for the backtrace to appear. If your theme does not support theme locations for the menu, then this method will likely not be useful.

On this page