Tom McFarlin

Software Engineering in WordPress, PHP, and Backend Development

Page 271 of 428

Robert Herjavec, Success, and WordPress

Several months ago, I stumbled across this video featuring Robert Herjavec (most notably from Shark Tank these days), and there were a number of things he said in the video that resonated with me.

I wanted to share it because not only do I think it’s worth a watch, but because I also think there are a number things that’ll resonate with many of you, as well:

Whenever I watch videos like this, one of the hardest things to do is to distill some of my favorite quotes into a single post, but in an effort to do just that, I thought I’d share some of the ones I like and how they relate to what I – and many of you – do for a living (or for a hobby), and then just list the rest as ones that I also enjoyed.

Continue reading

WordPress Meta Boxes: The Front End

This is the final post in a series on how to achieve simplicity with WordPress meta boxes.

The whole point of this entire series has been to demonstrate how to logically separate the various pieces that go into components a project by breaking them down into related components. Though I’ve been using them as a means to an end, the purpose of all of this is not about how to use WordPress meta boxes.

Anyway, to round out the series, the last thing to do is to take a look at exactly how to leverage the work that we’ve done thus far to bringing it to the front end so that the code that works on the backend actually does something on the front.

It’s not going to be anything particularly special or unique, but it should showcase the point nonetheless.

Continue reading

WordPress Meta Boxes: Each Component

This is the third post in a series on how to achieve simplicity with WordPress meta boxes.

In this series, I’ve been talking a little bit about how to simplify the code that we write by breaking it down into more modular components, and I’ve been doing so in the context of WordPress meta boxes.

To be clear, the point of this series is not simply to walk through how to keep the logic organized that goes into meta boxes, but to talk about the various parts that go into making up a component of a WordPress projects and how we can approach them through the their specialized areas of concern, and the how and why it’s important to do this.

In the previous post, I mentioned:

  1. The Server-Side Logic
  2. The Presentation Logic

And then I asked about how we actually go about representing the data. In this post, we’ll do exactly that.

Continue reading

WordPress Meta Boxes: Separating the Logic

This is the second post in a series on how to achieve simplicity with WordPress meta boxes.

In the previous post, I talked a bit about how working with WordPress meta boxes can be a bit of a hassle especially if you’re used to doing so in such a way the keeps all of the logic contained within a single file and a handful functions.

For example, if you’re working on a theme, then it’s likely that you’ve got a set of functions declared either in your functions.php file or file referenced by said file that is responsible for making a call to add_meta_box and all of the necessary arguments for rendering the meta box.

If you’re working on a plugin, it’s likely that this isn’t all together different; however, you may be approaching this from an object-oriented perspective. If that’s the case, then you may have a similar setup as above which isn’t really that different except you’re using classes and functions.

Continue reading

WordPress Meta Boxes: Aiming for Simplicity

This is the first post in a series on how to achieve simplicity with WordPress meta boxes.

For anyone who has does any kind of work with WordPress meta boxes, you know that it generally consists of the following steps:

  1. Define the meta box
  2. Define the callback functions responsible for displaying the markup

Pretty simple, isn’t it?

Of course if you’re looking to introduce a more advanced functionality into your meta box then you’re likely going to want to introduce stylesheets, JavaScript dependencies, nonce values, and perhaps even tabs to logically separate the options.

Given the fact that I’ve recently looked at some of the various ways to save data in WordPress meta boxes, I thought it might be work sharing one way to help separate the business logic from the presentation logic as it relates to incorporating WordPress meta boxes either in themes or plugins.

Continue reading

« Older posts Newer posts »

© 2026 Tom McFarlin

Theme by Anders NorenUp ↑