Changed Uber menu, now lost search bar

Hi,
I just changed two of the main menu items (Info centres and What’s on) in my main uber menu and moved them to sit as a sub category / menu under ‘Start Here’ tab. I added another menu item (Our Big Lap) and when i did this i lost my search bar that sat the the right of the menu and the orange opt in bar that sits below the main homepage image has now become distorted. Can you help?

Thanks,
Liz :slight_smile:

Hi Liz,

This is how I can see your homepage right now:

Is that where the search bar was existing back then? if so, I believe you could re-add it following any of these options?

Another way is to activate the search bar option in (Theme Options > Header) as in this screenshot:

Also, how exactly is the orange bar distorted? can you please share a screenshot?

Thanks.

Thanks Alaa,

Yes. That is where the search bar originally was. Thanks so much. I’ll give your suggestions a try.

The opt in looks perfect on your screen and on my mobile. I have attached a screenshot for you. I am looking on my laptop. Maybe that is why. I can’t remember it ever doing this before i made the changes though… weird.

I will have a look on a different monitor and see if it is the same as the laptop.

Thank you :slight_smile:

Sorry Alaa,

Just tried the search bar and it now sits underneath the other menu. How can i get it on the same line?

Also, the opt in is fine on my husbands laptop and large monitor so for some reason it’s just my laptop.

Thanks again :slight_smile:

Hello There,

I am not seeing the search bar. Please update your X theme first. X 6.2.5 is now available in automatic updates! This release contains fixes for several issues so be sure to check out the changelog (https://theme.co/changelog/). Please do update to the latest version. After doing the updates, always remember to clear all caches when updating so that the code from the latest release is always in use. This will help you to avoid any potential errors.

After you update, please turn on the Search icon in your theme options settings again so that we can check it back with the latest version of X.

Please let us know how it goes.

Hi RueNel,

I have just updated the theme, cleared the cache and enabled the search bar again. Still doing the same. Also, because the search bar icon jumps down to the next line it pushes my black background away from my logo causing a gap.

Any ideas on how to get the search bar and icon appearing on the right hand side after ‘Our Big Lap’?

Thanks,
Liz :slight_smile:

Hello Liz,

It turns out that an UberMenu bug is still present in the latest release. I have temporarily resolved the issue by adding this custom php code in your child theme’s functions.php

// Custom Search Navigation when Ubermenu is active
// =============================================================================
function x_navbar_search_navigation_item( $items, $args ) {
    
  if ( x_get_option( 'x_header_search_enable' ) == '1' ) {
    if ( $args->theme_location == 'primary' ) {

      if ( ! class_exists( 'UberMenu' ) ) {

        $items .= '<li class="menu-item x-menu-item x-menu-item-search">'
                  . '<a href="#" class="x-btn-navbar-search">'
                    . '<span><i class="x-icon-search" data-x-icon-s="&#xf002;" aria-hidden="true"></i><span class="x-hidden-desktop"> ' . __( 'Search', '__x__' ) . '</span></span>'
                  . '</a>'
                . '</li>';
      } else {
        $items .= '<li class="ubermenu-item ubermenu-item-level-0 x-menu-item x-menu-item-search">'
                  . '<a href="#" class="ubermenu-target x-btn-navbar-search">'
                    . '<span><i class="x-icon-search" data-x-icon-s="&#xf002;" aria-hidden="true"></i><span class="x-hidden-desktop"> ' . __( 'Search', '__x__' ) . '</span></span>'
                  . '</a>'
                . '</li>';
      }
    }
  }

  return $items;

}
add_filter( 'wp_nav_menu_items', 'x_navbar_search_navigation_item', 9998, 2 );
// =============================================================================

This code will not be affected nor applied when the new update with the bug fixed is release and installed in your site.

Please check your menu now.

Thanks so much. It’s up in the right position now. The only issue is previously there was a white box next to the search icon where you type. This is no longer there and i’m unable to type.

Can you tell me how to have the type box there again?

Hi @liz80y,

I don’t see any menu item that has the search box, hence, it’s not really going to appear unless you implemented. Please check this https://sevenspark.com/docs/ubermenu-3/content/shortcodes/search

Maybe what you’re referring was a search box that was part of the theme and since you’re now using Ubermenu, then you must follow their feature.

Thanks!

Perfect! Thanks for your help :slight_smile:

You’re welcome. Glad we could help. :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.