Home › Forums › WoodMart support forum › Hide Sub-categories showing on mouse hover on Main Categories on Shop page › Reply To: Hide Sub-categories showing on mouse hover on Main Categories on Shop page
November 29, 2021 at 2:03 pm
#335500
Luke Nielsen
Keymaster
Hello,
We will consider your feedback.
3. To be able to change scroll position after clicking on the page number to the beginning of products, try to add this code to the functions.php file in your child theme
if ( ! function_exists( 'woodmart_get_localized_string_array' ) ) {
/**
* Get localize array
*
* @since 1.0.0
*
* @return array
*/
function woodmart_get_localized_string_array() {
$menu_hash_transient = get_transient( 'woodmart-menu-hash-time' );
if ( false === $menu_hash_transient ) {
$menu_hash_transient = time();
set_transient( 'woodmart-menu-hash-time', $menu_hash_transient );
}
$site_custom_width = woodmart_get_opt( 'site_custom_width' );
$predefined_site_width = woodmart_get_opt( 'site_width' );
$site_width = '';
if ( 'full-width' === $predefined_site_width ) {
$site_width = 1222;
} elseif ( 'boxed' === $predefined_site_width ) {
$site_width = 1160;
} elseif ( 'boxed-2' === $predefined_site_width ) {
$site_width = 1160;
} elseif ( 'wide' === $predefined_site_width ) {
$site_width = 1600;
} elseif ( 'custom' === $predefined_site_width ) {
$site_width = $site_custom_width;
}
return array(
'menu_storage_key' => apply_filters( 'woodmart_menu_storage_key', 'woodmart_' . md5( get_current_blog_id() . '_' . get_site_url( get_current_blog_id(), '/' ) . get_template() . $menu_hash_transient ) ),
'ajax_dropdowns_save' => apply_filters( 'xts_ajax_dropdowns_save', true ),
'photoswipe_close_on_scroll' => apply_filters( 'woodmart_photoswipe_close_on_scroll', true ),
'woocommerce_ajax_add_to_cart' => get_option( 'woocommerce_enable_ajax_add_to_cart' ),
'variation_gallery_storage_method' => woodmart_get_opt( 'variation_gallery_storage_method', 'old' ),
'elementor_no_gap' => woodmart_get_opt( 'negative_gap', 'enabled' ),
'adding_to_cart' => esc_html__( 'Processing', 'woodmart' ),
'added_to_cart' => esc_html__( 'Product was successfully added to your cart.', 'woodmart' ),
'continue_shopping' => esc_html__( 'Continue shopping', 'woodmart' ),
'view_cart' => esc_html__( 'View Cart', 'woodmart' ),
'go_to_checkout' => esc_html__( 'Checkout', 'woodmart' ),
'loading' => esc_html__( 'Loading...', 'woodmart' ),
'countdown_days' => esc_html__( 'days', 'woodmart' ),
'countdown_hours' => esc_html__( 'hr', 'woodmart' ),
'countdown_mins' => esc_html__( 'min', 'woodmart' ),
'countdown_sec' => esc_html__( 'sc', 'woodmart' ),
'cart_url' => ( woodmart_woocommerce_installed() ) ? esc_url( wc_get_cart_url() ) : '',
'ajaxurl' => admin_url( 'admin-ajax.php' ),
'add_to_cart_action' => ( woodmart_get_opt( 'add_to_cart_action' ) ) ? esc_js( woodmart_get_opt( 'add_to_cart_action' ) ) : 'widget',
'added_popup' => ( woodmart_get_opt( 'added_to_cart_popup' ) ) ? 'yes' : 'no',
'categories_toggle' => ( woodmart_get_opt( 'categories_toggle' ) ) ? 'yes' : 'no',
'enable_popup' => ( woodmart_get_opt( 'promo_popup' ) ) ? 'yes' : 'no',
'popup_delay' => ( woodmart_get_opt( 'promo_timeout' ) ) ? (int) woodmart_get_opt( 'promo_timeout' ) : 1000,
'popup_event' => woodmart_get_opt( 'popup_event' ),
'popup_scroll' => ( woodmart_get_opt( 'popup_scroll' ) ) ? (int) woodmart_get_opt( 'popup_scroll' ) : 1000,
'popup_pages' => ( woodmart_get_opt( 'popup_pages' ) ) ? (int) woodmart_get_opt( 'popup_pages' ) : 0,
'promo_popup_hide_mobile' => ( woodmart_get_opt( 'promo_popup_hide_mobile' ) ) ? 'yes' : 'no',
'product_images_captions' => ( woodmart_get_opt( 'product_images_captions' ) ) ? 'yes' : 'no',
'ajax_add_to_cart' => ( apply_filters( 'woodmart_ajax_add_to_cart', true ) ) ? woodmart_get_opt( 'single_ajax_add_to_cart' ) : false,
'all_results' => esc_html__( 'View all results', 'woodmart' ),
'product_gallery' => woodmart_get_product_gallery_settings(),
'zoom_enable' => ( woodmart_get_opt( 'image_action' ) === 'zoom' ) ? 'yes' : 'no',
'ajax_scroll' => ( woodmart_get_opt( 'ajax_scroll' ) ) ? 'yes' : 'no',
'ajax_scroll_class' => apply_filters( 'woodmart_ajax_scroll_class', '.shop-loop-head' ),
'ajax_scroll_offset' => apply_filters( 'woodmart_ajax_scroll_offset', 100 ),
'infinit_scroll_offset' => apply_filters( 'woodmart_infinit_scroll_offset', 300 ),
'product_slider_auto_height' => ( woodmart_get_opt( 'product_slider_auto_height' ) ) ? 'yes' : 'no',
'price_filter_action' => ( apply_filters( 'price_filter_action', 'click' ) === 'submit' ) ? 'submit' : 'click',
'product_slider_autoplay' => apply_filters( 'woodmart_product_slider_autoplay', false ),
'close' => esc_html__( 'Close (Esc)', 'woodmart' ),
'share_fb' => esc_html__( 'Share on Facebook', 'woodmart' ),
'pin_it' => esc_html__( 'Pin it', 'woodmart' ),
'tweet' => esc_html__( 'Tweet', 'woodmart' ),
'download_image' => esc_html__( 'Download image', 'woodmart' ),
'cookies_version' => ( woodmart_get_opt( 'cookies_version' ) ) ? (int) woodmart_get_opt( 'cookies_version' ) : 1,
'header_banner_version' => ( woodmart_get_opt( 'header_banner_version' ) ) ? (int) woodmart_get_opt( 'header_banner_version' ) : 1,
'promo_version' => ( woodmart_get_opt( 'promo_version' ) ) ? (int) woodmart_get_opt( 'promo_version' ) : 1,
'header_banner_close_btn' => woodmart_get_opt( 'header_close_btn' ) ? 'yes' : 'no',
'header_banner_enabled' => woodmart_get_opt( 'header_banner' ) ? 'yes' : 'no',
'whb_header_clone' => woodmart_get_config( 'header-clone-structure' ),
'pjax_timeout' => apply_filters( 'woodmart_pjax_timeout', 5000 ),
'split_nav_fix' => apply_filters( 'woodmart_split_nav_fix', false ),
'shop_filters_close' => woodmart_get_opt( 'shop_filters_close' ) ? 'yes' : 'no',
'woo_installed' => woodmart_woocommerce_installed(),
'base_hover_mobile_click' => woodmart_get_opt( 'base_hover_mobile_click' ) ? 'yes' : 'no',
'centered_gallery_start' => apply_filters( 'woodmart_centered_gallery_start', 1 ),
'quickview_in_popup_fix' => apply_filters( 'woodmart_quickview_in_popup_fix', false ),
'one_page_menu_offset' => apply_filters( 'woodmart_one_page_menu_offset', 150 ),
'hover_width_small' => apply_filters( 'woodmart_hover_width_small', true ),
'is_multisite' => is_multisite(),
'current_blog_id' => get_current_blog_id(),
'swatches_scroll_top_desktop' => woodmart_get_opt( 'swatches_scroll_top_desktop' ) ? 'yes' : 'no',
'swatches_scroll_top_mobile' => woodmart_get_opt( 'swatches_scroll_top_mobile' ) ? 'yes' : 'no',
'lazy_loading_offset' => woodmart_get_opt( 'lazy_loading_offset' ),
'add_to_cart_action_timeout' => woodmart_get_opt( 'add_to_cart_action_timeout' ) ? 'yes' : 'no',
'add_to_cart_action_timeout_number' => woodmart_get_opt( 'add_to_cart_action_timeout_number' ),
'single_product_variations_price' => woodmart_get_opt( 'single_product_variations_price' ) ? 'yes' : 'no',
'google_map_style_text' => esc_html__( 'Custom style', 'woodmart' ),
'quick_shop' => woodmart_get_opt( 'quick_shop_variable' ) ? 'yes' : 'no',
'sticky_product_details_offset' => apply_filters( 'woodmart_sticky_product_details_offset', 150 ),
'preloader_delay' => apply_filters( 'woodmart_preloader_delay', 300 ),
'comment_images_upload_size_text' => sprintf( esc_html__( 'Some files are too large. Allowed file size is %s.', 'woodmart' ), size_format( (int) woodmart_get_opt( 'single_product_comment_images_upload_size' ) * MB_IN_BYTES ) ), // phpcs:ignore
'comment_images_count_text' => sprintf( esc_html__( 'You can upload up to %s images to your review.', 'woodmart' ), woodmart_get_opt( 'single_product_comment_images_count' ) ), // phpcs:ignore
'comment_images_upload_mimes_text' => sprintf( esc_html__( 'You are allowed to upload images only in %s formats.', 'woodmart' ), apply_filters( 'xts_comment_images_upload_mimes', 'png, jpeg' ) ), // phpcs:ignore
'comment_images_added_count_text' => esc_html__( 'Added %s image(s)', 'woodmart' ), // phpcs:ignore
'comment_images_upload_size' => (int) woodmart_get_opt( 'single_product_comment_images_upload_size' ) * MB_IN_BYTES,
'comment_images_count' => woodmart_get_opt( 'single_product_comment_images_count' ),
'search_input_padding' => apply_filters( 'wd_search_input_padding', false ) ? 'yes' : 'no',
'update_fragments_fix' => apply_filters( 'woodmart_update_fragments_fix', true ) ? 'yes' : 'no',
'comment_images_upload_mimes' => apply_filters(
'woodmart_comment_images_upload_mimes',
array(
'jpg|jpeg|jpe' => 'image/jpeg',
'png' => 'image/png',
)
),
'home_url' => home_url( '/' ),
'shop_url' => woodmart_woocommerce_installed() ? esc_url( wc_get_page_permalink( 'shop' ) ) : '',
'age_verify' => ( woodmart_get_opt( 'age_verify' ) ) ? 'yes' : 'no',
'age_verify_expires' => apply_filters( 'woodmart_age_verify_expires', 30 ),
'cart_redirect_after_add' => get_option( 'woocommerce_cart_redirect_after_add' ),
'swatches_labels_name' => woodmart_get_opt( 'swatches_labels_name' ) ? 'yes' : 'no',
'product_categories_placeholder' => esc_html__( 'Select a category', 'woocommerce' ),
'product_categories_no_results' => esc_html__( 'No matches found', 'woocommerce' ),
'cart_hash_key' => apply_filters( 'woocommerce_cart_hash_key', 'wc_cart_hash_' . md5( get_current_blog_id() . '_' . get_site_url( get_current_blog_id(), '/' ) . get_template() ) ),
'fragment_name' => apply_filters( 'woocommerce_cart_fragment_name', 'wc_fragments_' . md5( get_current_blog_id() . '_' . get_site_url( get_current_blog_id(), '/' ) . get_template() ) ),
'photoswipe_template' => '<div class="pswp" aria-hidden="true" role="dialog" tabindex="-1"><div class="pswp__bg"></div><div class="pswp__scroll-wrap"><div class="pswp__container"><div class="pswp__item"></div><div class="pswp__item"></div><div class="pswp__item"></div></div><div class="pswp__ui pswp__ui--hidden"><div class="pswp__top-bar"><div class="pswp__counter"></div><button class="pswp__button pswp__button--close" title="' . esc_html__( 'Close (Esc)', 'woocommerce' ) . '"></button> <button class="pswp__button pswp__button--share" title="' . esc_html__( 'Share', 'woocommerce' ) . '"></button> <button class="pswp__button pswp__button--fs" title="' . esc_html__( 'Toggle fullscreen', 'woocommerce' ) . '"></button> <button class="pswp__button pswp__button--zoom" title="' . esc_html__( 'Zoom in/out', 'woocommerce' ) . '"></button><div class="pswp__preloader"><div class="pswp__preloader__icn"><div class="pswp__preloader__cut"><div class="pswp__preloader__donut"></div></div></div></div></div><div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap"><div class="pswp__share-tooltip"></div></div><button class="pswp__button pswp__button--arrow--left" title="' . esc_html__( 'Previous (arrow left)', 'woocommerce' ) . '"></button> <button class="pswp__button pswp__button--arrow--right" title="' . esc_html__( 'Next (arrow right)', 'woocommerce' ) . '>"></button><div class="pswp__caption"><div class="pswp__caption__center"></div></div></div></div></div>',
'load_more_button_page_url' => apply_filters( 'woodmart_load_more_button_page_url', true ) ? 'yes' : 'no',
'menu_item_hover_to_click_on_responsive' => apply_filters( 'woodmart_menu_item_hover_to_click_on_responsive', false ) ? 'yes' : 'no',
'clear_menu_offsets_on_resize' => apply_filters( 'woodmart_clear_menu_offsets_on_resize', true ) ? 'yes' : 'no',
'three_sixty_framerate' => apply_filters( 'woodmart_three_sixty_framerate', 60 ),
'ajax_search_delay' => apply_filters( 'woodmart_ajax_search_delay', 300 ),
'site_width' => $site_width,
'combined_css' => woodmart_get_opt( 'combined_css', true ) ? 'yes' : 'no',
'slider_distortion_effect' => 'sliderWithNoise',
'ajax_links' => apply_filters( 'woodmart_ajax_links', '.wd-nav-product-cat a, .widget_product_categories a, .widget_layered_nav_filters a, .woocommerce-widget-layered-nav a, .filters-area:not(.custom-content) a, body.post-type-archive-product:not(.woocommerce-account) .woocommerce-pagination a, body.tax-product_cat:not(.woocommerce-account) .woocommerce-pagination a, .wd-shop-tools a:not(.breadcrumb-link), .woodmart-woocommerce-layered-nav a, .woodmart-price-filter a, .wd-clear-filters a, .woodmart-woocommerce-sort-by a, .woocommerce-widget-layered-nav-list a, .wd-widget-stock-status a, .widget_nav_mega_menu a' ),
);
}
}
4. The problem is that you have selected the “Share” buttons for mobile devices.
https://monosnap.com/file/2ykS1ZLRx5ilhqScjc2fELB1lPqzQc
You should enable the “Follow” buttons then the issue will be solved.
https://monosnap.com/file/bliuRMzosF10ldXIAUPu3eMWSPaOqp
Kind Regards