and one more: in lightbox apears some line “data-e-action-hash=”
Mobile menu parent link on xstore theme with elementor
11 replies3 participantsUpdated by Luca Rossi
-
11 Answers
Files is visible for topic creator and
support staff only.#436518 CopiedDear @2347281,
Please try adding this custom code under functions.php file locates in your child theme:
add_action('wp_footer', 'n2t_wp_footer'); function n2t_wp_footer() { ?> <script> jQuery((document).on('click touchend', '.etheme-elementor-nav-menu.vertical li a.item-link.etheme-elementor-nav-menu-item.etheme-elementor-nav-menu-item-parent', function (e){ window.location.href = jQuery(this).attr('href'); }); jQuery(document).on('click touchend', '.etheme-elementor-nav-menu.vertical li a.item-link.etheme-elementor-nav-menu-item.etheme-elementor-nav-menu-item-parent span.etheme-elementor-nav-menu-item-arrow', function (e){ var parent = jQuery(this).parent().parent(); console.log(parent); jQuery(parent).next('.nav-sublist-dropdown').slideToggle(); return false; });) </script> <?php }and one more: in lightbox apears some line “data-e-action-hash=”
Please provide the product URL.
Thank you!
#436690 CopiedHello,
Did this solution work?
I have the same problem with parent link on mobile menu.
Thanks
#438870 Copiedno,
i wrote my solution:
function xstore_modify_menu_items($items) { foreach ($items as &$item) { if (in_array('menu-item-has-children', $item->classes)) { $item->title = '<span class="has-submenu">' . $item->title . '</span>'; } } return $items; } add_filter('wp_nav_menu_objects', 'xstore_modify_menu_items'); function enqueue_custom_mobile_menu_script() { wp_enqueue_script( 'custom-mobile-menu', get_stylesheet_directory_uri() . '/js/mobile-menu.js', array('jquery'), filemtime(get_stylesheet_directory() . '/js/mobile-menu.js'), true ); } add_action('wp_enqueue_scripts', 'enqueue_custom_mobile_menu_script');now toggle opens dropdown, o category click opens category
#438871 CopiedDid you put this in the themes function.php file?
thanks
#438877 Copiedyep
#438880 CopiedThanks for the solution, but it didn’t work for me.
I added it to the functions.php file and cleared the cache, but the links are still not clickable.
I’ve switched to using the Elementor header instead of the native XStore theme header. Maybe that is why the code didnt work.
#438881 Copiedi’m on elementor too, should work, try on new device, it may be browser cache left
#438882 CopiedDear @Hassan,
We kindly request you to create a separate support ticket and provide the URL of your website along with the administrator account details.
Our team will be happy to assist you in debugging the custom codes.
Thanks for sharing a solution @2347281!
Best regards,
8Theme Team#438917 Copied@Hassan , I completely forgot and missed this: with the code we’re adding to functions.php, we’re also including a .js script. Please create a file named mobile-menu.js with the following code:
document.addEventListener("DOMContentLoaded", function () { const menuItems = document.querySelectorAll(".menu-item-has-children > a, .has-submenu"); menuItems.forEach((menuItem) => { menuItem.addEventListener("click", function (e) { const parentItem = this.closest(".menu-item-has-children"); if (!parentItem.classList.contains("submenu-open")) { e.preventDefault(); parentItem.classList.add("submenu-open"); } else { window.location.href = this.closest("a").href; } }); }); });and place it in the theme folder so that the path is:
xstore-child/js/mobile-menu.js#439029 CopiedThanks for sharing @2347281!
@Hassan you can also use this plugin to insert the custom codes: https://wordpress.org/plugins/code-snippets/.Best Regards,
8Theme’s Team#439039 Copied -
Want to reply? Log in, or register with your ThemeForest purchase code, to reply to this topic.
Similar topics
- Sublinks on Mobile Menu using Elementor, doesn;t work on mobileUnfortunatelly, even though I tried to fix it in multiple ways, I can't find the reason behind this malfunction that came after…Solved4 replies
- Elementor changes not reflecting on live site and mobile versions for Electronics Demo importI am working on my site (new.big-shotter-fireworks.co.uk) using the XStore theme with the "Electronics" demo imported. Issue: > I…Solved15 replies
- The dropdown menu on the mobile version does not expand when tappedThe dropdown menu on the mobile version does not expand when tappedSolved18 replies
- Filter errors for sidebar + shop menu – elementor theme builderThere seems to be count errors on sidebar filter + the dynamic categories swiper. Video referance: The brands are not showing…Solved14 replies
- Urgent Support Required: XStore Mobile Menu Not Displaying SubmenusI hope you are doing well. We have recently migrated our website from the staging environment to the live domain. Overall, the…Solved9 replies
- how to adjust the bottom menu items in mobile viewHow can I adjust this options ? like remove \ add new option, change the color etc ?Solved9 replies















