Software Engineering in WordPress, PHP, and Backend Development

Category: Articles (Page 94 of 258)

Personal opinions and how-to’s that I’ve written both here and as contributions to other blogs.

Load All WordPress Custom Fields via Database Query

When retrieving information from the WordPress database I prefer to avoid using direct database queries, but there are times in which they can be useful (and it’s important that it’s done right).

One use case in which it might be helpful is when you need to retrieve a set of data of a single type. Case in point: Say you need to load all WordPress custom fields.

At the time of this writing, there’s no function of which I’m aware that will do this, so here’s how I query the database to do so.

Continue reading

Team Communication (It Matters More So Than Your Tools)

Since bringing on a couple of contractors, one question that others ask is:

oWhat is it like to go from working on projects by yourself to working on projects with a team?

Or, more simply, what’s it like having contractors? The short answer is that I dig it because it affords some advantages:

  • we have to have a sharp division of work,
  • the business can take on more projects,
  • we’re able to collaborate on things (which is something I miss about flying solo),
  • and more.

The other side of this, though, is that I feel like I have to learn what it’s like to start a business all over again.

Team communication can feel like starting all over.

Like starting with a blank slate.

This, by no means, is a bad thing. It’s the opposite. But when you go from working on projects on your own and developing your setup, then there’s a period of adjustment that happens.

I’m still experiencing this and working through it. It requires both conversations with your team and a bit of introspection to determine if what you’re doing is still right for the way you work or if you should adjust it.

Continue reading

How To Start Blogging Regularly (Or Maybe Not)

I don’t write much about blogging on this site because it’s a bit meta and because I try to focus on WordPress development and related topics.

Blogging Regularly: Talking about it is a little meta.

Talking about blogging is a bit meta, isn’t it?

But one of the questions that I receive from fellow developers who are interested in blogging has asked this question enough times that I thought it might be worth providing a short answer here if for no other reason than I have a place to which I can link them when others ask me.

Continue reading

How To Get a WordPress Taxonomy By Term ID

Occasionally, when working on a project there are times in which it’d be nice to have an API function to help achieve whatever it is that needs to be done. Case in point: the ability to retrieve a taxonomy by term ID.

Get a Taxonomy By Term ID

Granted, it’s not a hard thing to do, but having the ability to retrieve the information from pre-existing functionality is always nice.

But when that’s not possible, we write our own way to do it, right?

Continue reading

Namespaces and Autoloading in WordPress

In my talk for this year’s WordCamp Atlanta, I’m going to be talking about namespaces and autoloading in WordPress.

Namespaces and Autoloading in WordPress

When I don’t yet have the images I want for my presentation, I use stock photos.

While working on my presentation:

  • I’ve been working on a project for someone in which I’m writing an autoloader from scratch,
  • I’m talking with other developers about their preferences with writing autoloaders,
  • I’m looking at open-source projects to see how others are writing autoloaders.

All of this is primarily done to see how, if it isn’t obvious, others implement namespaces and autoloading in their projects. What’s interesting is that there seem to be three main ways in which people go about doing it.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑