Posts relating to
Dev Tricks
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, wrapping it in span tags? Me too, oddly. I’m sure there’s a regex way to do this but at the time of writing my brain wasn’t willing to entertain the idea, so here’s a very simple way to achieve it using simple string and array […]
Cross-browser support for hiding scrollbars, including FireFox
May 13th, 2019Cross-browser support for scrollbar styling and visibility is a challenge. It’s as simple as that. This article provides a solution that addresses the issue of hiding the scrollbars, using scrollbar-width, ::-webkit-scrollbar and -ms-overflow-style. What are Scrollbars? Scrollbars are bars that appear down the right-hand side and across the bottom of the browser (or an element […]
Website Performance Gets Little Wins Using ‘noopener’
May 2nd, 2019Your website performance is critical for great user experience and can certainly help with SEO, too. One little know performance drain
Compress directories from the command line, excluding node_modules and development files
February 13th, 2019This simple article provides a CLI command to compress a directory whilst excluding specific sub-directories and files. We do a lot of custom development using modern development tools. From time-to-time we need to compress certain directories for deployment to production. In such cases, it is very common that some files and sub-directories need to be […]
How to fix the issue with IntelliJ and PHPStorm not resolving SASS and JS Imports
December 17th, 2018This article describes how to resolve the issue with IntelliJ not providing autocomplete for imported SASS and JS resources. The same fix can be applied to PHPStorm. IntelliJ is an awesome IDE, but recently it stopped recognising imported SASS and JS resources. This didn’t stop them from compiling, but was very annoying, as it flagged […]
Remove menu link types from the WordPress menu options screen
November 13th, 2018On a client site, we wanted to restrict menu items to Custom Links, only. Thus remove all other menu types. The main drive behind this was to improve the user experience and reduce confusion, as the menu is only for Social Links. With a brief search yielding very little I set about coding a solution, […]
How to break long words using CSS @supports
November 7th, 2018Recently, I had an odd scenario where wrapping long text needed either word-wrap, overflow-wrap or word-break to achieve the same overflow pattern across different browsers. To arrive at a suitable solution I opted to use @supports to maintain control of the declarations. What is @supports? @supports is a feature query, whose associated block of statments […]