Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1268763
    TiendaRD.org
    Participant

    Hi guys,

    I would like to know how to get elements like search, shopping cart, and sign in on the superfly nav bar menu. I would like them to appear when on mobile devices on the spot where the logo appears in http://superfly.looks-awesome.com/

    My website: tiendard.org

    #1269094
    Rue Nel
    Moderator

    Hello There,

    Thanks for writing in! The search and cart menu icon is a bug which is being displaced when Ubermenu is active. To fix it, since the child theme is set up, please add the following code in your child theme’s functions.php file

    // 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="" 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="" 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 );
    // =============================================================================
    
    // Custom Cart menu when uberMenu is active
    // =============================================================================
    function x_woocommerce_navbar_menu_item( $items, $args ) {
    
      if ( X_WOOCOMMERCE_IS_ACTIVE && x_get_option( 'x_woocommerce_header_menu_enable' ) == '1' ) {
        if ( $args->theme_location == 'primary' ) {
    
          if ( ! class_exists( 'UberMenu' ) ) {
    
            $items .= '<li class="menu-item x-menu-item x-menu-item-woocommerce">'
                      . '<a href="' . x_get_cart_link() . '" class="x-btn-navbar-woocommerce">'
                        . x_woocommerce_navbar_cart()
                      . '</a>'
                    . '</li>';
          } else {
            $items .= '<li class="ubermenu-item ubermenu-item-level-0 menu-item x-menu-item x-menu-item-woocommerce">'
                      . '<a href="' . x_get_cart_link() . '" class="ubermenu-target x-btn-navbar-woocommerce">'
                        . x_woocommerce_navbar_cart()
                      . '</a>'
                    . '</li>';
          }
        }
      }
    
      return $items;
    
    }
    add_filter( 'wp_nav_menu_items', 'x_woocommerce_navbar_menu_item', 9999, 2 );
    // =============================================================================

    Please let us know how it goes.

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