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

Check if Gutenberg Blocks are being used in Post or Page

During development of a site for a client, they requested the site to be built using Gutenberg blocks. On import of other existing posts from a previous site (that wasn’t using blocks), we found that content was simply put into the page on import. This was fine, except the blocks we designed were fullwidth with … Continued

Animated Count Up – alternative to CountUp.js

Occasionally a project requires some stats to show off and there is no better way than by adding a little animation to the number values. Historically I would use a script like CountUp.js but on a few projects I used that on, ran into a few issues that needed attention to avoid console errors depending … 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

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

Improve security by preventing author lookup

By default, WordPress allows a URL query to lookup system authors. This is done by simply entering the following after the site URL: ?author=1 From a WordPress perspective, the system will see the ‘author’ query in the URL and then try to match a username with that ID on the system, just like the system … Continued

Disable Emoji Support in WordPress

Use the function below to strip out and disable the emoji support in WordPress.  Emoji’s are enabled by default and add unnecessary styles and scripts in the header of the site, regardless of theme.   Adding the below to your themes functions.php or in a standalone plugin (to override regardless of theme) will do the job: … 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