Since v3.6
UberMenu Control Panel > General Settings > Theme Integration > Locate Theme Template Backtrace
Overview
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
The common scenario is that you’ve used automatic integration, but there is theme interference – so UberMenu is displayed, but incorrectly. This should also work for most instances where UberMenu is not displayed, provided the theme is calling wp_nav_menu()
to display its menu.
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 any menus 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.
Sometimes, the theme’s styles or layout will interfere with the display of the message. In this case, you can also see the backtrace within an HTML comment if you inspect the menu.