Posts relating to
Dev Tricks
How to password protect an external drive for Macs
December 15th, 2023Here are the steps we take to protect an external hard drive: Open Disk Utilities Select the drive to protect Select Erase Rename the drive Provide a secure password and a useful hint Erase and recreate the password protected drive Enjoy protect external assets 1. Open Disk Utilities > 2. Select the drive to protect […]
How to fix vagrant error “tee: /etc/exports: Operation not permitted”
May 10th, 2022Also, how to fix “nfsd service does not appear to be running” This solution is for Mac users only – thanks CW. Short answer: Open “System Settings” Unlock padlock Select “Full Disk Access” Add “Terminal” (or whatever you use) Close padlock Restart Terminal (if open)
How to add WP’s customizer CSS into the classic editor
April 23rd, 2022Recently, a newly acquired client needed the styling from the Customizer’s custom CSS to show in the classic editor (TinyMCE). In all my years of working with WordPress, this was the first time I’d had this request, so, knowing that you can inject styling into the TinyMCE editor, I set about finding a solution. There […]
How to reveal the footer from under the content, using position sticky
April 19th, 2022Once upon a time, a challenge like this, where you want to reveal a footer when the end of the content is reached, would have needed position: fixed|absolute and a bit of JavaScript to calculate the dynamic height of the footer, for responsiveness. Thankfully, we now have a much simpler solution, using sticky positioning. With […]
How to fix the PhpStorm error, “The IDE cannot create the directory”, in under a minute
April 6th, 2022On a couple of occasions, I’ve encountered a very annoying issue where PhpStorm will not open. Instead of opening it throws up the error message, “the IDE cannot create the directory.”, in a modal window. I’m using JetBrains’ Toolbox to manage their IDEs and on the whole it’s a great little app to navigate their […]
How to make position sticky work in Safari
July 24th, 2021To make position sticky work in Safari make the sticky element a block and make a parent relative.
How to create a Live Template in PHPStorm and WebStorm
November 11th, 2020Use Live Templates to create custom code snippets that you can quickly insert into your code by typing a custom abbreviation. This is extremely handy for commonly used code blocks, such as the echo statement in php or inserting a php block into html. In this example I’ll demonstrate how to create a php block […]
How to Move a Meta Box in WordPress
August 2nd, 2020Sometimes you want to programmatically move a WordPress meta box to a more ideal position on the editor screen. Here’s my way, with code.
Use the hover media query to detect mobile devices
April 13th, 2020Have you needed to apply styling to only touch devices, or only non-touch devices? Well, great news, the hover media query can ease your woes.
Convert br tags to span tags
July 6th, 2019Have you ever needed to convert the string immediately before br tags and wrap it in span tags instead? Me too. There is very likely a regex solution but here’s a very simple way to achieve it using string and array functions. /** * Replace linebreaks with span tags * * Wraps each string immediately before a […]