Software Engineering in WordPress, PHP, and Backend Development

Author: Tom (Page 31 of 426)

Resources, Week of 6 June 2021

Note long ago, I started sharing stuff on Twitter pretty regularly. But I don’t that much more either. So, given that I’ve started keeping a list of things in Apple Notes that I find useful, I thought I might as well return to form and share them here.

They will probably have a much longer shelf-life and maybe reach more people between subscribers and tweeting out a link to the post.

Continue reading

Don’t Over-Architect Your Blog Posts

At some point, I lost the motivation to write about anything that would include too much code because of the amount of time it would take to:

  • put a functioning solution together,
  • architect it in such a way that’d fit with best practices (at least for OOP),
  • explain the various features about OOP that the reader may not know,
  • then explain the problem.

This is too complex.

I’m not saying that articles shouldn’t be written that explain the concepts of object-oriented programming or shouldn’t talk about certain rationale for why something was done.

Continue reading

Programmatically Search WordPress Posts By Date Range

TL;DR: The code shared in this post shows how you can modify the query that runs on the All Posts page so you can limit how you search posts to a specified date range.

It’s been a little while since I last wrote about using the post_where filter for modifying the search query that runs on a given page, such as the All Posts area of WordPress. But given the fact that there are a variety of uses for retrieving posts – and custom post types – in different ways, there’s a variety of ways to use this single filter.

Continue reading

Add Custom Link to All Posts Screen Based on Post Meta Data

TL;DR: This article outlines the code needed to add a custom link on the All Posts screen that uses a custom piece of post metadata.

Note: A few months ago, I wrote an article on how to add a custom view to the All Posts screen. This article is not all together the same, but not all together different. Think of it as a more detailed and perhaps for more practical implementation of the concept.


Assume that you have a standard post type or a custom post type and you’re going to simply filter by a headline that you define using a mechanism that allows you to save data to the post_metadata table.

For example, let’s say that you have a post and it as a piece of meta data with:

  • a meta_key with the value of article_attribute
  • a meta_value with the value of headline

And you want to use this information to add a new Headlines link that automatically filters everything out except articles with that metadata.

Here’s how to do it.

Continue reading

Resources, Week of 24 May 2021

Years ago (maybe a decade – or more, yikes 😬) I used to post links to resources that I found online that I found interesting or useful for other people that were designers, developers, or anyone who was interested in doing something on the web in-general. Case in point, here’s a post from 2010.

A broad umbrella, I know.

And then I started sharing stuff on Twitter pretty regularly. But I don’t that much more either. So, given that I’ve started keeping a list of things in Apple Notes that I find useful, I thought I might as well return to form and share them here.

They will probably have a much longer shelf-life and maybe reach more people between subscribers and tweeting out a link to the post.

Continue reading
« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑