Tagged: x
-
AuthorPosts
-
October 5, 2016 at 8:43 am #1203411
2342JParticipantHi again,
When I enable search in the customizer the icon appears below the menu (while using ubermenu) – this is not enabled right now because I want to resolve our previous ticket first. I just wanted to document it so that I don’t forget. I’ll reply to this thread when I turn it on for you.October 5, 2016 at 9:24 am #1203463
ThaiModeratorHi There,
I couldn’t find the search button in your navbar.
Could you please add it again?
http://i.imgur.com/rU8woSd.png
Thanks.
October 5, 2016 at 2:34 pm #1203924
2342JParticipantHi Thai,
I closed out the other ticket and have re-enabled the navbar search. Take a look at it. The login credentials from the previous ticket will work for you here as well.October 5, 2016 at 5:52 pm #1204126
JadeModeratorHi Landon,
You can add this under Custom > CSS in the Customizer.
.x-menu-item-search { float: right; padding-top: 18px; }Hope this helps.
October 5, 2016 at 6:24 pm #1204150
2342JParticipantOoh, wow. Works. Thanks!
October 5, 2016 at 8:28 pm #1204348
LelyModeratorYou’re welcome Landon!
Cheers!
October 7, 2016 at 12:38 pm #1207065
2342JParticipantOh, one more thing. On the mobile menu the search button appears at the bottom as cut off. Can you tell me how to fix that as well as edit the before click color?
October 7, 2016 at 10:13 pm #1207630
Rue NelModeratorHello There,
The search menu icon were displaced when UberMenu is active. To really fix your search menu icon, since you already have your child theme active and ready, please insert this following code in your child theme’s functions.php file.
// 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">' . '<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 ); // =============================================================================You might need to remove the css code we gave to you in the previous reply.
Hope this helps. Please let us know how it goes.
October 8, 2016 at 1:47 pm #1208147
2342JParticipantThat puts the search where it belongs in both the desktop and mobile, but when clicking on the icon it doesn’t activate the search function.
October 9, 2016 at 12:05 am #1208485
Rue NelModeratorHello There,
Thanks for the updates! The search overlay should appear upon clicking on the search icon. In your case, it does not happen because there were some JS error on the page. This error is because of the Google map API key. Please disable this api key in the Ubermenu settings. You may go to Appearance > UberMenu > General Settings > Assets. You must disable the “Load Google Maps API” option. Please see this screenshot: http://prntscr.com/crkols
If still nothing works out, would you mind providing us the url of your site with login credentials so we can take a closer look and fix the issue?
To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / passwordDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
Thank you.
October 11, 2016 at 5:33 pm #1212121
2342JParticipantThis reply has been marked as private.October 11, 2016 at 5:33 pm #1212123
2342JParticipantI disabled the Google Maps API, but it’s still not working.
October 12, 2016 at 1:25 am #1212556
Paul RModeratorHi,
To fix the search, you can add this in your Custom > Edit Global Javascript.
jQuery(function($) { var $trigger = $('.x-btn-navbar-search'); var $formWrap = $('.x-searchform-overlay'); var $input = $formWrap.find('.search-query'); var escKey = 27; function clearSearch() { $formWrap.toggleClass('in'); setTimeout(function() { $input.val(''); }, 350); } $trigger.on('touchstart click', function(e) { e.preventDefault(); $formWrap.toggleClass('in'); $input.focus(); }); $formWrap.on('touchstart click', function(e) { if ( ! $(e.target).hasClass('search-query') ) { clearSearch(); } }); $(document).keydown(function(e) { if ( e.which === escKey ) { if ( $formWrap.hasClass('in') ) { clearSearch(); } } }); });Hope that helps.
October 12, 2016 at 11:30 am #1213160
2342JParticipantThat had no effect.
October 12, 2016 at 8:03 pm #1213860
RadModeratorHi there,
Your added javascript is incomplete,
uery(function($) { var $trigger = $('.x-btn-navbar-search'); var $formWrap = $('.x-searchform-overlay'); var $input = $formWrap.find('.search-query'); var escKey = 27; .... ..Should be
jQuery(function($) { var $trigger = $('.x-btn-navbar-search'); var $formWrap = $('.x-searchform-overlay'); var $input = $formWrap.find('.search-query'); var escKey = 27; .... ..Thanks!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1203411 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
