code
-
Recently I was rebuilding the Helpful Digital intranet using a WordPress block theme called UniBlock. As part of this I had written a custom plugin to register a new post…
-
For a recent mapping project I implemented Algolia Places for address autocompletion to turn an address into latitude and longitude for querying the database. In the past we’ve used Google Maps,…
-
Advanced Custom Fields (ACF) is a great WordPress plugin for adding custom meta fields. It has a very useful relationship field that can be used to denote a connection from…
-
A typical PHP snippet to create a Zip file looks something like this: $zip = new ZipArchive(); $zipname = ‘package_name.zip’; if ( true === $zip->open( $zipname, ZipArchive::CREATE ) ) {…
-
One gap in the abilities of WP CLI at the moment is the ability to modify an already existing wp-config.php file. v1.2 introduced the –force flag to overwrite an existing…
-
Updated 02 – 05 – 18: plugins object is now returned as an array. On a whim this May bank holiday, tucked up on the sofa watching movies, I decided…
-
Fancy sending your WordPress site back (or forward) in time for a day? Thanks to the multitude of filters it only takes a few lines of code. In this example…
-
Jump to the bottom if you want to go straight to the script I recently set up a new VPS on DigitalOcean and chose to manage the web stack and…
-
WordPress has a handy get_terms() function that retrives a list of all the terms for a taxonomy – this is great if you are, for example, building a <select> box…
-
Garlic.js is a great library – it uses localStorage to save the state of forms, so if your users accidentally close the tab or browser before submitting, their entry isn’t…