Tagged: x
-
AuthorPosts
-
February 3, 2017 at 2:47 pm #1357190
GeorgiaGParticipantHello. I tried to address this with other solutions I found in the knowledge base but it did not do the trick. I would like to keep this in the menu or add it to the top bar by the social icons like so:
search icon | social, social, social
Can you help me? The preferred outcome is to keep it in the menu. Thank you.
February 3, 2017 at 11:17 pm #1357644
Rue NelModeratorHi 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 // ============================================================================= 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 ); // =============================================================================Please copy the raw code from here (http://pastebin.com/9kkh3Emg) to preserve the unicode html entities or the data-x-icon value.
Please let us know if this works out for you.
March 10, 2017 at 12:19 pm #1402158
MMR5280ParticipantI had the same problem and tried this so the search icon is now aligned with the menu, but it is broken. It does nothing when you click it.
March 10, 2017 at 2:52 pm #1402312
JadeModeratorHI there,
Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.
March 10, 2017 at 9:09 pm #1402673
MMR5280ParticipantThis reply has been marked as private.March 11, 2017 at 2:15 am #1402849
Rue NelModeratorHello There,
Thanks for providing the url of your site. The search icon does nothing because there is a JS error on the page. It is caused a by script loaded by UberMenu. To resolve this, please go to Appearance > UberMenu settings under General Settings>Assets. You must uncheck “Load Goggle Maps API”.
Hope this helps. Please let us know how it goes.
March 12, 2017 at 12:06 am #1403553
MMR5280ParticipantHi, Unfortunately unchecking “Load Google Maps API” did not fix it.
(Side note: I am not currently using a caching plugin so nothing is cached. Tested in several browsers also).
March 12, 2017 at 3:55 am #1403650
Rue NelModeratorHello There,
Thanks for updating in! To resolve this issue, we need to have a JS script that will trigger the search form overlay. Please add the following JS code in the customizer, Appearance > Customize > 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 this helps. Kindly let us know.
March 12, 2017 at 5:55 am #1403700
MMR5280ParticipantThat worked, however, there is no way to exit the search overlay without hitting esc. (Not all users know about hitting escape, so it would be nice to make it work like the example below).
For example, on this site (not using ubermenu) http://violentzen.com/, when you click search in the menu the overlay comes up but you only need to click off of it (or hit esc) and it disappears.
March 12, 2017 at 5:44 pm #1404062
RadModeratorHi there,
Let’s close button, please add this CSS to Admin > Appearance > Customizer > Custom > CSS
.x-searchform-overlay-inner:before { content:"x"; position: absolute; top:10px; right: 20px; display: block; padding: 3px 10px; background:rgba(255,255,255, 0.1); border-radius: 100px; cursor: pointer; cursor: hand; }Hope this helps.
March 13, 2017 at 2:43 am #1404512
MMR5280ParticipantAdded the css but it didn’t work. :/
March 13, 2017 at 3:06 am #1404524
ChristopherModeratorHi there,
Please see the attachment, the code works fine.
Thanks.
March 13, 2017 at 3:26 am #1404546
MMR5280ParticipantViolentzen.com is not the site in question.
I need it to work with uber menu on http://dev.medicalmassageoftherockies.com/
March 13, 2017 at 4:39 am #1404609
Rue NelModeratorHello There,
Thanks for updating in! Please have the given JS code updated and make use of this code:
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) { e.preventDefault(); if ( ! $(e.target).hasClass('search-query') ) { clearSearch(); } $formWrap.toggleClass('in'); }); $(document).keydown(function(e) { if ( e.which === escKey ) { if ( $formWrap.hasClass('in') ) { clearSearch(); } } }); });Hope this helps. Please let us know how it goes.
March 13, 2017 at 8:51 pm #1405781
MMR5280ParticipantThat worked. Thank you for all the help. 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1357190 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
