Libra by Sara_p

Knowledgebase Docs » UberMenu 2 » Theme Integration

UberMenu integrates easily with Libra, but there is some significant residual styling because the menu styles are based on the #nav ID, which is not set via wp_nav_menu. All we need to do is change the id=”nav” to id=”nav-uber”, but since the menu is not printed directly in the header.php, we can’t use the normal WordPress template system to just override the header template. Instead, we can use Libra’s template system to provide our own replacement nav template. Here’s what needs to be done:

  1. Create a child theme for Libra
  2. Create our own topbar.php template which will replace the default Libra template. This template will contain a single modification – change id="nav" to id="nav-uber"
  3. Override the pluggable yit_topbar() function so we can replace the template with our own. Add this code to the child theme’s functions.php:
    function yit_topbar() {
        require_once( 'topbar.php' );
  4. Activate the child theme and set a menu in the theme location in Appearance > Menus

I’ve created a child theme that does all of this for you. Just install and activate it, then set up your menu as usual.

Download the Libra Child Theme