Change default weight unit for FedEx shipping in Magento

If your store offers multiple shipping methods to your customers, it’s important to align all shippers to use the same unit for weight. This is becuase weight in Magento is not actually a particular unit. Weight to Magento is just a number, so theoretically, could be grams, kilograms, pounds, tonnes, you name it. Realistically, you … Continued

Add Category ID into the body and post class in WordPress

Here’s a little snippet I regularly use to add the ID of the post/page into the body class and post class. It’s really helpful to aid targeting specific things in CSS, add functionality with javascript and to quickly pinpoint the ID of a page without checking through the back-end. Add this to your themes functions.php … Continued

Call Google’s jQuery Library in Your Template

Why use your own bandwidth when you can use Google’s own! This snippet ensures your WordPress website correctly calls the Google jQuery library direct from Google for speed, security and reliability: NB: Just make sure you use the above with… …in your header file, or wherever your wp_head scripts get called from.

Remove the admin bar from the front-end of WordPress

This little snippet removes the admin bar permanently from all users while logged in and viewing the website from the front-end. Personally, I never use it and always turn it off with this little snippet.

Remove Error Message on WP-login to increase security

Hackers and bots are more prevalent than ever. It is vitally important you protect your WordPress install from every type of potential attack. One simple way hackers attempt to get into your install is via the login form. Most people stick with ‘admin’ as the default username for their admin account. This is bad. Already, … Continued

Check if homepage with PHP in Magento

This snippet wraps around your homepage-specific code in order to only display when on the homepage of your store. The ‘home’ identifier may be different for your site so amend as necessary.

Make Woocommerce Products Sold Individually By Default

So one of my new personal websites sells virtual products where customers buy just one product at a time. I don’t need quantities and nor do I want quantity boxes on the product page or the checkout, there just no need for it. So there could be a way to bring in some jQuery into … Continued

Remove Billing & Shipping Address In Woocommerce Checkout

Depending on the type of products you are selling via a Woocommerce store, sometimes you don’t need the billing and shipping address details on the Woocommerce checkout page. Adding this little snippet to your functions.php file, you can deregister them from loading easily: