Kevinleary.net, LLC.

Blog

Thoughts, notes, and advice on custom WordPress development, web consulting and enterprise web development.

Most Common Cause of a Slow WordPress Admin

A slow WordPress admin is the worst, it can significantly reduce publishing productivity, and it’s a big pain for anyone that works in the admin frequently. It can be caused by many things, but the most common and least discussed seems to be slow HTTP API responses from premium or paid plugins that require a…

Offline Conversion Tracking

Tracking important business actions that happen beyond your website or application is a critical step for businesses in a disruptive industry. It’s one of the best ways to reduce your CAC, which is a top focus of disruptive companies looking to rapidly grow in a slow moving industry. Event & Session Tracking Event tracking allows…

Custom Events in Google Tag Manager

Tracking custom analytics events provide a business with the ability to track specific customer actions online that are most valuable, rather than what an analytics platform prescribes as the most valuable. Implementing custom events in various systems can quickly become complex, so it’s a good idea to use a system like Google Tag Manager to…

Social Security Number Validation Rules (Regex)

If you’re building a web application or custom WordPress plugin that needs to validate a US Social Security Number (SSN) then the following approach will provide a way to validate user input without the use of any third-party verification API.

SVG Support & Broken Images

If your WordPress website has broken or missing SVG images and you have the SVG Support plugin installed your issue can be quickly solve with the following quick fix.

A Better Email Address Regular Expression

Over the years I’ve found that this regular expression provides just the right balance of loose and strict pattern recognition to safely be used as a method for validation an email address.

Google Fonts in Gutenberg Editor Styles

If you’re having trouble replacing the font-family for the block editor in WordPress, this undocumented alternative approach should provide a frustration free alternative. The standard approach that uses the add_editor_style function won’t support the loading of external assets in CSS with the @import rule.

Tracking Changes in WordPress

Track, log and notify team members when changes are made to a WordPress website’s file system, database and DNS.

Select Placeholder Color CSS

The select HTML tag doesn’t support a placeholder attribute like an input tag, and when it comes to the CSS color attribute it doesn’t leave many options for style. There are a few ways to provide a select dropdown with a placeholder that can have it’s color CSS styled similar to a ::placeholder pseudo element.

Update an ACF Repeater Field Programmatically

To update a repeater field created with Advanced Custom Fields programmatically you’ll need to use the update_field() function. Populating Untouched/Unsaved Repeater Fields The following approach will pre-populate an ACF field using the $rows array. The field ID provided in this example is repeat-field-id, replace this with your field ID when you programmatically update the field.…

Get WordPress Post Content by Post ID

If you’re wondering how to get WordPress post content by post ID then look no further. The following simple approaches will explain the best approaches to use, and when to choose between unfiltered or filtered content. Raw HTML This will get the content without any of the built-in WordPress filters that format the output. This…

List Every Action & Filter Hook in WordPress

Adding custom functionality to WordPress for business themes and plugins always involves working with action and filter hooks. This is WordPress’ event architecture, and it’s a core reason why it’s so extensible. The action hooks and filters changes from install to install, because most plugins provide a set of custom filters and hooks for developers…

Loading additional posts…