WordPress solutions for agencies and small businesses

Hi, my name is Alex Mansfield. I partner with agencies and small businesses to design, develop, and maintain high quality WordPress websites.

Latest Posts

Inverting Tables Responsively

Tables are notoriously difficult to handle responsively. If there is a significant difference between the number of rows and the number of columns, the ideal layout for large screen sizes uses more columns then rows, but the ideal layout for small screens uses more rows than columns. However, there is no simple way to handle […]

Beaver Builder, FacetWP, and Infinite Scroll

For some reason, FacetWP doesn’t support infinite scroll when paired with the Posts module in Beaver Builder. However, working with some code from GitHub, I was able to modify it to work with Beaver Builder. Here is the code: (function( $ ) { ‘use-strict’; var throttleTimer = null; var throttleDelay = 100; $(function() { var […]

How to Filter Canonical URLs in WordPress

The canonical URL can be modified programmatically in WordPress using the get_canonical_url filter hook. Recently I was working on a site that needed custom canonical URLs on specific search result pages. I went looking for the documentation on filtering the canonical URLs, but while the existence of the filter is documented, I could not find […]

Styling links based on partial URLs with CSS

Sometimes you just want to style all the links pointing to a certain site, or containing a certain string in the URL. For example, styling all links to Wikipedia to stand out from regular links or hiding all links that include “registration” in the URL. It’s just a matter of using: href*= in the CSS […]

Setting a Custom Post Type Archive as the Home Page

It took me quite a bit of research to figure out how to modify the home page query to use a custom post type archive. Here’s what it takes… 1. Set the home page to display a static page On the Settings > Reading page, make sure the “Your homepage displays” option is set to […]

Preventing Widows with Vanilla Javascript

What is a Widow? When referring to text on a website, a “widow” refers to the final word of a heading or paragraph that wraps to its own line. Like this: To prevent this from happening, we can use the HTML entity for non-breaking spaces between the last two words: A non-breaking space prevents the […]