XStore (8theme)

Knowledgebase Docs » UberMenu 3
UberMenu 3

Appearance > Menus Screen Menu Item Settings

XStore alters the output of the WordPress core menus screen by adding its own branding (“8Theme”) to every menu item.

As this alteration changes the standard name used for a menu item (.e.g from “Category” to “8Theme Category Options”), it prevents UberMenu’s script from properly detecting the menu item type, and as such breaks the menu item admin interface.

We’ve tracked down the filter code in the theme that causes the issue

Unfortunately, as this filter’s callback is a class method, but the theme does not maintain a reference to the class instance, there is no way to precisely target this filter for removal

There is also no way to disable the third party “Nav Menu Images” code that this appears to be a part of.

Since the theme does not provide the flexibility to remove this unnecessary code, we provide the following workaround, which removes all filters and then adds back in only UberMenu’s. (Ideally, the theme would either offer a way to actually unhook that filter, or disable third party code like Nav Menu Images via a setting or constant)

add_filter( 'wp_setup_nav_menu_item' , 'remove_theme_menu_images_filter' , 10 , 1 );
function remove_theme_menu_images_filter( $item ){
  remove_all_filters( 'wp_setup_nav_menu_item' , 10 );
  add_filter( 'wp_setup_nav_menu_item' , 'ubermenu_setup_nav_menu_item' );
  return $item;

This code can be added in the child theme’s functions.php, and will remove the theme’s branding from the menu items, allowing UberMenu to properly detect the item types.

After adding this code, the UberMenu settings in the Appearance > Menus screen should work properly.