Tom McFarlin

Software Engineering in WordPress, PHP, and Backend Development

Page 162 of 427

When To Register Custom Post Types

Custom Post Types are arguably the feature that brought WordPress from being a standard blogging application up to a CMS. I’d even go as far to say that this feature also added new APIs for developers to use when building web applications.

Custom Post Types

Here’s a post, but this isn’t exactly representative of a custom post type.

Though posts, pages, and basically anything that as a title and the editor (among other optional features) are post types, custom post types are what allow us to actually create a model of information to store in the database, associated with metadata, and more.

The point of this post isn’t about how great custom post types are, though. Instead. it’s about how to handle the case whenever you receive the following message:

Fatal error: Call to a member function add_rewrite_tag() on a non-object

Fatal error? That’s never good. The nice thing is that this isn’t really terribly difficult to fix.

Continue reading

Atom Packages for WordPress Development

For the last few months, I’ve been using Atom as my primary IDE, and I’ve been happy with it. It took a little while to get it set up to my liking, but such is the case of an IDE that claims to be “a hackable text editor for the 21st century.”

Or more formally:

Atom is a text editor that’s modern, approachable, yet hackable to the core—a tool you can customize to do anything but also use productively without ever touching a config file.

Much of the strength of the IDE lies not in the IDE itself but what can be done with it once you’ve installed packages, themes, and so on.

Atom

Since I’ve been using it, I’ve written a few posts about it (which I’ll share at the end of this post). Though now that some time has passed, I thought I’d share some of the Atom packages for WordPress developers that I recommend (leaving those out that I don’t).

Continue reading

Highlight a WordPress Admin Active Submenu

If you’re working on a theme or a plugin for WordPress and you want to highlight an active submenu item, then your implementation is going to vary based on where you want to highlight the actual item.

Active Submenu Items

An overexaggerated menu to help drive this point home.

This is one of those times where it’s helpful to have clear terminology for what you’re trying to modify:

  • Are you working on trying to highlight an active submenu in the admin menu,
  • Or are you working to highlight an active submenu on the front-end of the theme?

There’s no consistent way to do this. For what it’s worth, I don’t think they should be as they are two completely different entities (for lack of a better term). Perhaps having some semi-consistent filter names would be nice, but that’s about it.

Regardless, when you set out to highlight an active submenu item, it’s important to note which part of the project you’re working on and then go from there.

Continue reading

Improving WordPress Plugin User Experience

When working on a new WordPress plugin or generally speaking, a new feature of a project that will integrate with the WordPress back-end, I’m of the mind the all of the elements should inherit the styles provided by WordPress.

In short, I’m not a fan of when other people build things for the application and use the set of controls they think “look good” or that deviate from the core set of elements and style.

This isn’t to say that there aren’t improvements that can’t be made within WordPress, but there are also reasons for the look, feel, and usability of things as they currently are. And over time, I believe that these things will evolve just as they’ve done this far.

But what do you do when you’re working on a feature and you’re unsure of how it should work from a user experience perspective and you don’t really have a guide from which to draw?

Continue reading

The Facets of a WordPress Developer

Do a few Internet searches for “WordPress developer” and you’re bound to find more than a few posts on the topic. Though my goal isn’t to add to the plethora of articles that already exist, there are a few thoughts I have as it relates to the topic.

And all of it comes from time spent working in the WordPress economy, working with others, talking with others, and so on.

This isn’t a post about how to hire, what salaries should be, or how to interview a person. It just has to do with the type of work we do.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑