Home › Forums › Themes Support › Claue › Stickybits in Function.php
- This topic has 14 replies, 2 voices, and was last updated 5 years, 2 months ago by Harry.
-
AuthorPosts
-
-
October 19, 2019 at 4:46 am #34186
I’m trying to find out what is causing my website scrolling issues. When you scroll on mobile, you have to try a few times before it finally slides and on desktop Chrome browser, an extra scroll bar is appearing on right side and there is hesitant scrolling here as well. For desktops this only seems to happen in chrome. But mobile its on every page. go to my home page and when it finishes loading try to slide up or down. Also i get this message on dashboard “Your theme (Claue Child) contains outdated copies of some WooCommerce template files. These files may need updating to ensure they are compatible with the current version of WooCommerce.” But the templates are up to date as far as i can tell.
Is this coded needed in function.php under claue-child theme folder?
// Enqueue Stickybits and initialize it.
add_action( ‘wp_enqueue_scripts’, ‘sk_load_stickybits’ );
function sk_load_stickybits() {
wp_enqueue_script( ‘stickybits’, get_stylesheet_directory_uri() . ‘/js/jquery.stickybits.min.js’, array( ‘jquery’ ), CHILD_THEME_VERSION, true );
wp_enqueue_script( ‘stickybits-init’, get_stylesheet_directory_uri() . ‘/js/stickybits-init.js’, array( ‘stickybits’ ), CHILD_THEME_VERSION, true );
} -
October 19, 2019 at 8:44 am #34188
Hi,
1. Please try remove the script.
2. Please go to WooCommerce > Status and check which file outdated and go to claue-child > woocommerce file and update version of the file https://prnt.sc/plc0us
Kind regards
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio -
October 19, 2019 at 10:30 am #34190
Everything seems up to date on templates far as i can see. so you think the script is causing this? i will try to remove, but if that doesn’t work, not sure what to try next. This scroll issue happens on every part of website for me but not on some other people using other types of mobile. I use iphone 10. but some of the different versions work fine.
Woocommerce Status script shows template up to date like this:
Your theme has a woocommerce.php file, you will not be able to override the woocommerce/archive-product.php custom template since woocommerce.php has priority over archive-product.php. This is intended to prevent display issues.
Overridesclaue-child/woocommerce/cart/cross-sells.php,
claue-child/woocommerce/content-product.php,
claue-child/woocommerce/content-single-product.php,
/home/realmccoy101/public_html/wp-content/plugins/woocommerce-email-control/templates/emails/supreme/admin-cancelled-order.php,
/home/realmccoy101/public_html/wp-content/plugins/woocommerce-email-control/templates/emails/supreme/admin-failed-order.php,
/home/realmccoy101/public_html/wp-content/plugins/woocommerce-email-control/templates/emails/supreme/admin-new-order.php,
/home/realmccoy101/public_html/wp-content/plugins/woocommerce-email-control/templates/emails/supreme/customer-completed-order.php,
/home/realmccoy101/public_html/wp-content/plugins/woocommerce-email-control/templates/emails/supreme/customer-invoice.php,
/home/realmccoy101/public_html/wp-content/plugins/woocommerce-email-control/templates/emails/supreme/customer-new-account.php,
/home/realmccoy101/public_html/wp-content/plugins/woocommerce-email-control/templates/emails/supreme/customer-note.php,
/home/realmccoy101/public_html/wp-content/plugins/woocommerce-email-control/templates/emails/supreme/customer-on-hold-order.php,
/home/realmccoy101/public_html/wp-content/plugins/woocommerce-email-control/templates/emails/supreme/customer-processing-order.php,
/home/realmccoy101/public_html/wp-content/plugins/woocommerce-email-control/templates/emails/supreme/customer-refunded-order.php,
/home/realmccoy101/public_html/wp-content/plugins/woocommerce-email-control/templates/emails/supreme/customer-reset-password.php,
/home/realmccoy101/public_html/wp-content/plugins/woocommerce-email-control/templates/emails/supreme/email-addresses.php,
/home/realmccoy101/public_html/wp-content/plugins/woocommerce-email-control/templates/emails/supreme/email-customer-details.php,
/home/realmccoy101/public_html/wp-content/plugins/woocommerce-email-control/templates/emails/supreme/email-downloads.php,
/home/realmccoy101/public_html/wp-content/plugins/woocommerce-email-control/templates/emails/supreme/email-footer.php,
/home/realmccoy101/public_html/wp-content/plugins/woocommerce-email-control/templates/emails/supreme/email-header.php,
/home/realmccoy101/public_html/wp-content/plugins/woocommerce-email-control/templates/emails/supreme/email-order-details.php,
/home/realmccoy101/public_html/wp-content/plugins/woocommerce-email-control/templates/emails/supreme/email-order-items.php,
/home/realmccoy101/public_html/wp-content/plugins/woocommerce-email-control/templates/emails/supreme/email-styles.php,
claue-child/woocommerce/single-product-reviews.php,
claue-child/woocommerce/single-product.php -
October 19, 2019 at 11:04 am #34192
If you see like this https://prnt.sc/plcvp8, please update 3.1.1 to 3.3.1
Kind regards
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio -
October 21, 2019 at 8:22 pm #34199
ok nothing i did seems to fix this. its very annoying and doesn’t happen on any other sites on my mobile. i removed all of the CSS additional code temporarily and tested it and still does that. can you help me figure out where the error is coming from. every page is doing this. https://bestfitbybrazil.com. even my sandbox.bestfitbybrazil.com is doing same thing.
-
October 21, 2019 at 9:45 pm #34204
Hi,
I still see the error js https://prnt.sc/pmaelb
Could you please send me admin account of sanbox to check?
Btw, your support expired. Could you please renew your support at https://themeforest.net/item/claue-clean-minimal-woocommerce-theme/18929281 that will help us continue develop new features and improve our theme.
Thanks
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio -
October 21, 2019 at 10:10 pm #34205This reply has been marked as private.
-
October 21, 2019 at 11:02 pm #34207
btw the code in style.css and function.php is code from developer. please don’t delete anything without letting me know because they are working on project. i will upgrade tonight or by morning.
-
October 21, 2019 at 11:06 pm #34208
Please change code to
function sk_load_stickybits() { wp_enqueue_script( 'stickybits', get_stylesheet_directory_uri() . '/js/jquery.stickybits.min.js'); wp_enqueue_script( 'stickybits-init', get_stylesheet_directory_uri() . '/js/stickybits-init.js'); }
from line 17 to line 20 in file functions.php
Kind regards
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio -
October 21, 2019 at 11:53 pm #34209
ok i made this change. is it working for you? cause my mobile still has scroll problem. i cleared cache. and on desktop this happens with Google Chrome. its a little sticky when scrolling with mouse and to the right side you will notice 2 scrollbars instead of 1.
-
October 22, 2019 at 7:29 am #34210
I check your sandbox site it can’t load. On live site the error code still there https://prnt.sc/pmhkes.
Kind regards
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio -
October 22, 2019 at 7:45 am #34212
did you make sure to clear cache? Leverage browsing and other settings are in play. What about sandbox? what do you mean it won’t load? On live site the function.php under claue-child has the change you sent.
// Enqueue Stickybits and initialize it.
add_action( ‘wp_enqueue_scripts’, ‘sk_load_stickybits’ );
function sk_load_stickybits() {
wp_enqueue_script( ‘stickybits’, get_stylesheet_directory_uri() . ‘/js/jquery.stickybits.min.js’);
wp_enqueue_script( ‘stickybits-init’, get_stylesheet_directory_uri() . ‘/js/stickybits-init.js’);
}do you need access to anywhere else to check this again?
-
October 22, 2019 at 5:00 pm #34218
Hi,
Please remove the code because i don’t see the js file include in child theme. If issue still there, please try remove below code
if ( wp_is_mobile() ) { // Header Sticky $data['header_sticky'] = cs_get_option( 'header-sticky' ); }
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio -
October 22, 2019 at 8:43 pm #34223
ok i’ve taken this code out, but still not working. and i see the error still showing on console inspection. what file is this code being called from? maybe if i remove the call then there will be no error.
HTTP404: NOT FOUND – The server has not found anything matching the requested URI (Uniform Resource Identifier). GET – https://bestfitbybrazil.com/wp-content/themes/claue-child/js/jquery.stickybits.min.js?ver=5.2.4
HTTP404: NOT FOUND – The server has not found anything matching the requested URI (Uniform Resource Identifier). GET – https://bestfitbybrazil.com/wp-content/themes/claue-child/js/stickybits-init.js?ver=5.2.4
Again, the reference in the link is pointing to a path where the file does not exist. the files exist here:
https://bestfitbybrazil.com/wp-content/themes/claue-child/includes/assets/js/
What i don’t know is if this code is even needed. but again its pointing to wrong path for files. i can’t change it cause i don’t know which file is making the call ??
-
October 22, 2019 at 9:34 pm #34226
Please change the code to
function sk_load_stickybits() { wp_enqueue_script( 'stickybits', get_stylesheet_directory_uri() . '/includes/assets/js/jquery.stickybits.min.js'); wp_enqueue_script( 'stickybits-init', get_stylesheet_directory_uri() . '/includes/assets/js/stickybits-init.js'); }
Kind regards
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio
-
-
AuthorPosts
You must be logged in to reply to this topic.