, LLC.


Sensible approaches to build and maintain custom WordPress websites.

Unique Pageviews in Google Analytics 4

The older universal analytics implementation of Google Analytics has a “Unique Pageviews” metrics is a commonly used performance metric for many websites. Unfortunately the concept of _Unique Pageviews_ has been removed entirely Google Analytics 4, the metric doesn’t exist at all. Here’s how to revive it and track unique pageviews in GA4.

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…

Repairing Crashed Database Tables in WordPress

3 ways to fix a common WordPress database error: “Table is marked as crashed and should be repaired”. The choices involve using SQL, PHPMyAdmin, or PHP code.

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.

JS Fix for “SyntaxError: Cannot use import statement outside a module”

“SyntaxError: Cannot use import statement outside a module” is a common Node.js error when working with `import` to include modules or packages.

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…

WordPress: Create a New User with PHP

How to login to WordPress website with only FTP access by creating a new administrator user with programmatically with PHP.