Home Forums WoodMart support forum Mobile bottom navbar issue with latest update

Mobile bottom navbar issue with latest update

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #301154

    metuza
    Participant

    Hello,

    Just installed latest version and done my usual tests around in my staging site. All looks good so far except from the mobile navbar.

    I have set it to show Mobile menu, Home page, Shop page, Blog page and My account. With this setting it shows only Mobile menu and My account.

    If i select to show all buttons then it shows only Cart, Mobile Menu and My account.

    Brgds
    Rune

    #301260

    Artem Temos
    Keymaster

    Hello,

    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' );

    Kind Regards

    #301269

    metuza
    Participant

    Thank you, that did the trick 🙂

    Brgds
    Rune

    #301281

    Artem Temos
    Keymaster

    Great, you are welcome! You can remove the code right after the 6.1.1 update.

Viewing 4 posts - 1 through 4 (of 4 total)