Home › Forums › WoodMart support forum › Sticky category menu not working anymore
Sticky category menu not working anymore
- This topic has 6 replies, 2 voices, and was last updated 5 years, 8 months ago by Artem Temos.
-
AuthorPosts
-
April 25, 2019 at 3:39 pm #120960
McDuck4ParticipantHello.
After an update to the newest WordPress version my sticky category menu is not working anymore. I have made a child theme, where I added the following code to functions.php to make the category menu sticky with scroll.
Can you guys see why it is not working?
/* Make the section "Kategorier" sticky on scroll */ function woodmart_sticky_header_categories(){ $template = ' <div class="whb-sticky-header whb-clone whb-main-header"> <div class="<%cloneClass%>"> <div class="container"> <div class="whb-flex-row whb-general-header-inner"> <div class="whb-column whb-col-left whb-visible-lg"> <%.header-categories-nav%> </div> <div class="whb-column whb-col-center whb-visible-lg"> <%.main-nav%> </div> <div class="whb-column whb-col-right whb-visible-lg"> <%.woodmart-header-links%> <%.search-button%> <%.whb-wishlist-icon%> <%.woodmart-shopping-cart%> </div> <%.whb-mobile-left%> <%.whb-mobile-center%> <%.whb-mobile-right%> </div> </div> </div> </div> '; return $template; }
April 25, 2019 at 4:08 pm #120965
Artem TemosKeymasterHello,
Could you please disable all plugins that are not related to our theme and provide us your admin access so we can check it?
Thank you in advance
April 25, 2019 at 7:30 pm #120982
McDuck4ParticipantThank you for the answer. I made a user and posted in the private content section.
April 26, 2019 at 6:06 am #121020
Artem TemosKeymasterThe code is not complete. Where exactly you got it? Maybe you forgot to copy some part.
April 26, 2019 at 6:32 am #121034
McDuck4ParticipantHello.
I got the code from here. It has been working 1 day ago:
https://xtemos.com/forums/topic/placing-category-dropdown-menu-in-sticky-header/
The code there is in the theme functions.php is:
function woodmart_sticky_header_categories(){ $template = ' <div class="whb-sticky-header whb-clone whb-main-header"> <div class="<%cloneClass%>"> <div class="container"> <div class="whb-flex-row whb-general-header-inner"> <div class="whb-column whb-col-left whb-visible-lg"> <%.header-categories-nav%> </div> <div class="whb-column whb-col-center whb-visible-lg"> <%.main-nav%> </div> <div class="whb-column whb-col-right whb-visible-lg"> <%.woodmart-header-links%> <%.search-button%> <%.whb-wishlist-icon%> <%.woodmart-shopping-cart%> </div> <%.whb-mobile-left%> <%.whb-mobile-center%> <%.whb-mobile-right%> </div> </div> </div> </div> '; return $template; } add_filter( 'woodmart_header_clone_template', 'woodmart_sticky_header_categories' );
April 26, 2019 at 6:35 am #121036
McDuck4ParticipantUPDATE:
Now it is suddenly working. Did you do anything?
April 26, 2019 at 11:16 am #121073
Artem TemosKeymasterNo, we didn’t change it. But the last code is a correct one.
-
AuthorPosts
Tagged: menu
- You must be logged in to create new topics. Login / Register