Rename Completed order status in WooCommerce

I had a task from a client to rename the default WooCommerce order status from the original to a custom name. The client wanted to rename ‘Completed’ status in WooCommerce, to a new status ‘Dispatched’, as once the order has been sent out, they wanted it a little clearer that it was sent, rather than … Continued

Changing WooCommerce Availability Text

Sometimes you may want to change the default text that WooCommerce states under a products availability. By default, WooCommerce lists products in stock as either ‘X in stock’ or only showing the message when you are running low on stock. These are set in the WooCommerce settings: WooCommerce -> Settings -> Products -> Inventory -> … Continued

Add Bootstrap 4 Navwalker to Roots Sage 9

I had some trouble getting the Bootstrap 4 Navwalker into a new Sage Roots 9x theme. I tried the instructions seen on the navwalker page but kept getting errors and whitescreens. Eventually, here’s what I did to get it working: 1. Download the Bootstrap 4 Navwalker file and add it to the theme: https://github.com/MWDelaney/sage-bootstrap4-navwalker Be … Continued

Prevent blurry Woocommerce gallery images after 3.3 update

Woocommerce has updated a few times since, but I ran into a confusion when trying to understand how a clients product images were looking blurry as thumbnails on the product page. The Settings -> Media were set to 300×300 The Appearance -> Customize -> Woocommerce -> Product images were set to 300×300 The themes functions … Continued

Add Prefix to URL of Custom Post Type

While you can use a plugin to accomplish this, I always prefer to code this manually without the need for a plugin. To explain what we’re trying to achieve here, usually, creating a CPT (Custom Post Type) just adds this onto the site domain or where WP is installed. So normally, the URL would look … Continued

Altering archive orderby or posts-per-page on custom post type

On a project recently, I was using a custom post type for locations. These consisted of places, cities and districts as a non-hierarchial cpt. Running the archive of the post type on a standard archive.php file naturally lists the posts in order of publish date – most recent displayed first.   The archive also took into … Continued

Redirect Woocommerce Multisite shop page to another URL

Here’s a snippet to switch a Multisite Woocommerce store from one store shop page to another.  Handy when you point your store Shop page to the main store from a subsite shop page.  You may have done this in the menu, but if you use breadcrumbs then this will still show the current site store … Continued

Make Bootstrap nav dropdown appear on hover

Both Bootstrap version 3 & 4’s default navigation has nav menus toggled on click enabled by default — you have to actually click the parent item to have them open/show the sub-menu, and click again to them shut.  This is fine for some applications, but the default behaviour of most navigations is to show the … Continued