X

BLOG

Remove menu link types from the WordPress menu options screen

On a client site, we wanted to restrict menu items to Custom Links, only. Thus remove all other menu types.…

Mervyn Booth

How to break long words using CSS @supports

Recently, I had an odd scenario where wrapping long text needed either word-wrap, overflow-wrap or word-break to achieve the same…

Mervyn Booth

Conditionally enqueue scripts and stylesheets on specific pages

There are many use-cases where scripts and stylesheets only need to be loaded on certain pages. One such example would…

Mervyn Booth

Using LD+JSON Schema to Enhance SEO for Blog Posts

Schema markup helps search engines understand your content by describing its primary purpose, in a machine-friendly way. The most recent,…

Mervyn Booth

Nesting CSS Media Queries

Processing styling rules based on certain criteria, such as viewport width, is achieved using the @media conditional group rules. As of October…

Mervyn Booth

Adding Feature Images to the WordPress RSS Feed

The WordPress RSS feed is great. We use it with third-party services, such as MailChimp. One key datum that isn't…

Mervyn Booth

How to trim words by character limit

We recently encountered a scenario where the client wanted to trim the news items titles to a maximum number of…

Mervyn Booth

WP Code Tip: get array of post IDs

A number of times over my years developing in WordPress I've needed to extract the post IDs of the posts…

Mervyn Booth

Use PHP’s in_array() to compare a variable to multiple values

When comparing a variable with multiple values consider using in_array(), instead of complex if expressions. I love clean, easy-to-read code,…

Mervyn Booth

How to reindex spotlight on macOS to stop it closing after a few characters

This post is a somewhat off-topic, but for all those of you that are working on Macs, here's a little…

Mervyn Booth

This website uses cookies.