Home › Forums › WoodMart support forum › problem with mobile bottom navbar when updated to new version
problem with mobile bottom navbar when updated to new version
- This topic has 5 replies, 2 voices, and was last updated 4 years, 2 months ago by
Artem Temos.
-
AuthorPosts
-
June 22, 2021 at 5:07 am #301243
itsterry0908Participant1, when updated to new theme version, the shop page icon and label is missing at bottom, and cart icon is also missing, please solve this as soon as possible!
2, when I click search icon on mobile, it jumps to sidebar search as always, not full screen search as new updated.The screenshot is attached.
Attachments:
You must be logged in to view attached files.June 22, 2021 at 6:24 am #301262
Artem TemosKeymasterHello,
1. Thank you for reporting this bug. We will fix this in our update very soon. Try to add the following PHP code snippet to the child theme functions.php file to fix this
function woodmart_sticky_toolbar_template() { $fields = woodmart_get_opt( 'sticky_toolbar_fields' ); $classes = ''; if ( isset( $fields['enabled']['placebo'] ) ) { unset( $fields['enabled']['placebo'] ); } $enabled_fields = class_exists( 'XTS\Options' ) ? $fields : $fields['enabled']; if ( ! woodmart_get_opt( 'sticky_toolbar' ) || ! $enabled_fields ) { return; } if ( woodmart_get_opt( 'sticky_toolbar_label' ) ) { $classes .= ' wd-toolbar-label-show'; $classes .= woodmart_get_old_classes( ' woodmart-toolbar-label-show' ); } woodmart_enqueue_inline_style( 'bottom-toolbar' ); woodmart_enqueue_inline_style( 'header-elements-base' ); $classes .= woodmart_get_old_classes( ' woodmart-toolbar' ); ?> <div class="wd-toolbar<?php echo esc_attr( $classes ); ?>"> <?php foreach ( $enabled_fields as $key => $value ) { $key = class_exists( 'XTS\Options' ) ? $value : $key; switch ( $key ) { case 'wishlist': woodmart_sticky_toolbar_wishlist_template(); break; case 'cart': woodmart_sticky_toolbar_cart_template(); break; case 'compare': woodmart_sticky_toolbar_compare_template(); break; case 'search': woodmart_sticky_toolbar_search_template(); break; case 'account': woodmart_sticky_toolbar_account_template(); break; case 'mobile': woodmart_sticky_toolbar_mobile_menu_template(); break; case 'sidebar': woodmart_sticky_sidebar_button( false, true ); break; case 'link_1'; case 'link_2'; case 'link_3'; case 'link_4'; case 'link_5'; woodmart_sticky_toolbar_custom_link_template( $key ); break; case 'home'; case 'blog'; case 'shop': woodmart_sticky_toolbar_page_link_template( $key ); break; } } ?> </div> <?php } add_action( 'wp_footer', 'woodmart_sticky_toolbar_template' );
2. Full-screen search needs to be activated in the search element via Dashboard -> WoodMart -> Header builder.
Kind Regards
June 22, 2021 at 6:45 am #301265
itsterry0908ParticipantHello,
I have added the code to child theme, shop icon and label show up, but the cart icon is still missing, please see the screenshot. Full screen search is now working.
Attachments:
You must be logged in to view attached files.June 22, 2021 at 7:06 am #301282
Artem TemosKeymasterTry to add the following code as well
function woodmart_sticky_toolbar_cart_template() { if ( ! woodmart_woocommerce_installed() || ( ! is_user_logged_in() && woodmart_get_opt( 'login_prices' ) ) ) { return; } $settings = whb_get_settings(); $opener = false; $classes = ''; if ( isset( $settings['cart']['position'] ) ) { $opener = $settings['cart']['position'] == 'side'; } if ( $opener ) { $classes .= ' cart-widget-opener'; } woodmart_enqueue_inline_style( 'header-cart' ); $classes .= woodmart_get_old_classes( ' woodmart-shopping-cart' ); ?> <div class="wd-header-cart wd-design-5 wd-tools-element<?php echo esc_attr( $classes ); ?>" title="<?php echo esc_attr__( 'My cart', 'woodmart' ); ?>"> <a href="<?php echo esc_url( wc_get_cart_url() ); ?>"> <span class="wd-tools-icon wd-icon-alt"> <?php woodmart_cart_count(); ?> </span> <span class="wd-toolbar-label"> <?php esc_html_e( 'Cart', 'woodmart' ); ?> </span> </a> </div> <?php }
June 22, 2021 at 7:19 am #301288
itsterry0908ParticipantThanks, it worked
June 22, 2021 at 7:23 am #301289
Artem TemosKeymasterYou are welcome!
-
AuthorPosts
The topic ‘problem with mobile bottom navbar when updated to new version’ is closed to new replies.
- You must be logged in to create new topics. Login / Register