Remove P tags from Contact Form 7 forms

I love Contact Form 7 and use it on 99% of my client and my own sites. It’s simple, lightweight and does a perfect job for mail. Depending on the form you use, you sometimes need to remove the <p> and <br> tags that appear in the form, which are auto-generated by the plugin. While … 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

The easiest way to export WordPress comments into another site

Recently, during a website makeover, I began working on a new site and while developing it, new comments had been added to the live site.  As I had already made a copy of the site to work on at the start of the project, the latest comments wouldn’t have been included in my copy when … 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

Set stored address as default for Shipping or Billing in Magento

A current project I’m working on with a client required to import 20k customers with address, contacts and profile data – a tricky task in itself. I managed it import this successfully, but noted that the addresses were set to Shipping and not Billing.  This meant that customers could not be searched or filtered from … Continued

Image Zoom on hover with pure CSS

Here’s a short snippet for getting a nice fancy zoom when hovering over an image using purely CSS3. Here’s an example:   and here’s the code: You simply need to add the class ‘img-zoom’ to any image’s container to get the effect.   Feel free to play about with the values in the zoom to … Continued

Add new admin user in WordPress from PHPMyAdmin

Similar to another post which does the same thing in OpenCart, here’s how to add a new admin-level user to WordPress – without any access to the wp-admin area. I find this useful when I’m called in to finish off an abandoned website and have no idea what the login credentials are – I’ll simply … Continued

Force a file to download when link is clicked

So here’s a simple snippet for when you want to force a download of a file (such as a PDF, .doc etc), when a link is clicked. The default action will open the document in the either the same browser window, or in a new tab/window by using the usual target methods: Open file in … Continued