Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1181743
    johnlednicky
    Participant

    I’m still having the same issue with search not working. On my test site that has the same setup and same issue I disabled every plugin but Ubermenu and search still didn’t do anything when clicked.

    #1181792
    Rupok
    Member

    Hi there,

    Can you provide your other site where it’s working?

    Thanks!

    #1181860
    johnlednicky
    Participant

    It’s johnlednicky.com but it has the same issue. It all started once I added the code to the child theme.

    #1181963
    Joao
    Moderator

    Hi There,

    Your sub menu looks fine on my end, would mind providing a screenshot?

    Also let us know which browser and device you are using while experiencing the issue.

    Thanks

    Joao

    #1181981
    johnlednicky
    Participant

    It’s not an issue with the sub menu now. The issue is that when the search icon is clicked nothing happens other than an anchor(#) is added to the URL. I’ve tried it in Safari, Chrome, and Firefox with the same problem happening each time.

    #1182020
    Joao
    Moderator

    Hi There,

    You need to add the class: x-btn-navbar-search to youe search link.

    Once you have added the class it will open as it should.

    Hope it helps

    Joao

    #1182102
    johnlednicky
    Participant

    Where would I add that to? I don’t actually have search added on my menu under “Appearance > Menu” I just have navbar search enable under “Customize > Header”.

    #1182597
    Lely
    Moderator

    Hi There,

    I can see this error on your console:
    js:93 You have included the Google Maps API multiple times on this page. This may cause unexpected errors.

    Ubermenu is loading Google MAP API too. Please disable it because it is loaded by the theme already. Go to Ubermenu Control Panel > General Settings Tab > Assets > Load Google Maps API: Uncheck this
    Do let us know how this goes.

    #1182629
    johnlednicky
    Participant

    I had already disabled that so I have no clue what else is loading Google Maps API. I don’t see any plugins that mention using it.

    #1182743
    Paul R
    Moderator

    Hi,

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password
    – FTP credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    #1183396
    johnlednicky
    Participant

    I already provided a link to my site and WordPress credentials earlier in this thread. I will need to work on getting the FTP credentials to you.

    #1184210
    Lely
    Moderator

    Hello John,

    I did check again and the function that was added to the class is missing on your site. x-btn-navbar-search class holds this function. This class is there on your search icon link but the function that will trigger this is missing. Although, there’s no error on the console. You could try testing for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

    #1184994
    johnlednicky
    Participant

    Are you sure that it’s a plugin issue? I’ve already tried disabling all of them and it still didn’t work. It seems that the code that you me add to the child theme is what’s causing the issue. As soon as I remove that it starts working again. Here is that code.

    // Custom Search Navigation
    // =============================================================================
    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”>’
    . ‘
    . ‘<span><i class=”x-icon-search” data-x-icon=”” aria-hidden=”true”></i><span class=”x-hidden-desktop”> ‘ . __( ‘Search’, ‘__x__’ ) . ‘</span></span>’
    . ‘

    . ‘‘;
    } else {
    $items .= ‘<li class=”ubermenu-item ubermenu-item-level-0 x-menu-item x-menu-item-search”>’
    . ‘
    . ‘<span><i class=”x-icon-search” data-x-icon=”” aria-hidden=”true”></i><span class=”x-hidden-desktop”> ‘ . __( ‘Search’, ‘__x__’ ) . ‘</span></span>’
    . ‘

    . ‘‘;
    }
    }
    }

    return $items;

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

    #1185506
    Rad
    Moderator

    Hi there,

    Yes, please remove that. Redeclaring which already been added (search menu items) may break it.

    Thanks!

    #1185582
    johnlednicky
    Participant

    Great, it all appears to be working now! The only other thing I need help with is centering the search option on mobile devices. Right now it’s left aligned.

  • <script> jQuery(function($){ $("#no-reply-1166025 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>