Skip to main content

Posts

Showing posts with the label theme

Remove unused Wordpress stylesheets and scripts - Just code it!

  Just have found a good way to remove unnecessary css and js links on your website header. If you aren't familiar with a good page load auditor, you might visit Gtmetrix.com , Pingdom.com , and Google Page Speed  to check your site's performance. Unused CSS and JS scripts makes your site's page load so heavy and sometimes it turns over 10 to 30 seconds to display your frontend on the browser. Thus, this way could also give you more idea on how do you manage your site's performance.  I have tried several times the use of  wp_dequeue_style()  functions both in my child and parent theme but didn't worked. However, I never liked contact form 7 to run out in my front-end since before I get into Wordpress platform so I often removed it by adding code define( 'WPCF7_LOAD_CSS', false )  into wp-config.php just below define( 'WP_DEBUG', false ) . So let's get started. You must first check the running css on your front-end on browser element inspector. On

Deprecated add_to_cart_fragments, fix it!

ISSUE (error) : The The “add_to_cart_fragments” hook uses out of date data structures and function is deprecated since version 3.1.2. Replace with woocommerce_add_to_cart_fragments The function ‘add_to_cart_fragments’ is an outdated woocommerce function. Woocommerce version 3.0 and above have changed the filter to ‘woocommerce_add_to_cart_fragments. If your WordPress, themes and plugins are outdated then this problem could be easily fixed by updating your website in just a click! If you’re having trouble with this on your website’s “error_logs” while your website is up to date, you should find where the “add_to_cart_fragments” function is located. See the photo where I found “add_to_cart_fragments” On my end under the ‘Essential Grid’ plugin. add_to_cart_fragment filter I replaced the “add_to_cart_fragments” to “woocommerce_add_to_cart_fragments” then finally the error_logs is now clean!   Please take note:  review first the file class-wc-deprecated-filter-hooks.php under