Create your own button via a shortcode

Here’s a quick little snippet for adding your own shortcode which generates a button in any post or page from a single shortcode. Within the shortcode, there are 2 options to add a url for the button and the text that appears on the button itself.   Then, to add the button anywhere in a … Continued

Output All Custom Field Data In A Loop – Including ACF Fields

During a recent build using Gutenberg editor, I needed to check the output of custom fields in a post as the fields weren’t displaying when getting called. To output all custom fields in a post loop, you can use this handy snippet to show all fields and it’s data. This also works for ACF (which … Continued

Make Bootstrap 4 dropdowns appear on hover

Bootstrap is awesome. I seriously love it and always use it for project builds. And that’s either Bootstrap 3 or 4 – whatever the projects require, I’ll usually always go with BS. When it comes to dropdowns, especially so in navigation menus, I always prefer dropdown submenus to appear on hover. By default, this is … Continued

Convert WooCommerce variation dropdowns into radio buttons

I had an eCommerce project where the client wanted to display options for their products as selectable radio buttons rather than the default select dropdowns. To achieve this, we need to write two functions: 1 will grab the selected options for the product, and for each variation available, write them to a radio button input … Continued

Add code to the WordPress Head, Body and Footer without a plugin

With tracking codes and pixels able to help you track conversions and the successes of your marketing efforts, these will need to be added to each page of your site to track user journey and behaviours. While there are plugins to achieve being able to do this, I always prefer to build this into my … Continued

Show different number of Posts Per Page for different Post Types

During work for a recent client, I needed to limit the number of posts on one archive, yet show every post on a single page for another. By default WordPress uses the value set in the admin screen ‘Settings’ > ‘Reading’ and seen as ‘Blog pages show at most’. But in my case, I needed … Continued

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

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

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

Make Div Full Height Of Device Display Size

Previously, I wrote a short post with a snippet to allow full-size CSS backgrounds. This is great and I use it all the time, but this method will stretch the image background to the max width, thus height is in proportion to the width. What this means, is that landscape images will perfectly fit the … Continued