Tom McFarlin

Software Engineering in WordPress, PHP, and Backend Development

Page 272 of 428

The Art of Solving Problems in Your Sleep

I don’t consider myself a “creative” – I think that term is usually designated for designers, artists, and illustrators, and other types. Developers – although we create things – are creative in a different way.

It’s more about problem solving, I guess.

Anyway, one of the things that seems to be the most common among people of the similar trade is the challenge that comes with having to solve problems that we’re stuck on during the daily grind.

I can’t speak about designers (though I know this is something that affects those who I do know), but in terms of developers, I know that the problem works something like this:

At some point during a project, we get mired in a problem and we’re unable to solve it. The more we try to solve it, the more the frustrated we get. Ultimately, we step away from the computer, but what happens in a few hours?

We end up solving the problem while focused on something else.

It’s an interesting thing, and it’s something around which plenty of research is done (and, I’m sure even has a proper name for it), but the point of all of this has nothing to do with mentioning the fact that this exists.

It’s how we – as developers or even those creative types – can leverage it to our own success. Continue reading

Looking at the Next Version of Dev Practices

For a little over half a year now, I’ve been running (or simply managing, at times) a Tumblr blog called Dev Practices. The whole idea behind the blog is simply this:

A day in the life of a developer as illustrated by GIFs.

But I’ve been surprised. The site’s been a lot of fun to manage, people have been contributing to it, and there’s a backlog of at least a month’s worth of content.

So, like any developer at this point, I’ve started thinking about Dev Practices 2.0 (of course, I should probably come up with a better than than name, right?)

Continue reading

Two Ways to Save Meta Box Data in WordPress

Recently, I was having a conversation with a friend about some of the various ways to serialize the values that are present within a collection of meta boxes that are defined for any type of post – be it a post, page, or a custom post type – within WordPress.

For example, imagine that you have a custom post type that has, say, four different meta boxes that are available below the main content area.

These meta boxes can be laid out in one of two ways:

  • The meta boxes can be listed individually with each meta box having its own set of values. Think of WordPress’ Excerpt field, Discussion field, and and Sharing Field.
  • The meta boxes can all be contained within a single container accessible by individual tabs.

The question is does the way that the meta boxes are displayed influence how the values are serialized in the database?

Continue reading

GitHub Is Not Your CV (Nor Is Your Blog)

As it relates to developers, it’s been said that certain sites provide a paper trail of the work that we’ve done since we’ve been working in a professional capacity.

For example:

  • How many times have you heard that GitHub is your CV?
  • Or what about the idea that your blog is a paper trail of your thoughts about the work that you’ve done and/or the industry in which you’re involved?
  • Or perhaps you’ve even heard that sites such as Stack Overflow (or any of the other Stack Exchange sites) provide some type of portfolio or journal that provides a glimpse as to the type of information you’re after, and the type of information in which you’re well-versed.

From the outset, I think that the overall idea behind each of the aforementioned points is well-intentioned, but I’ve rarely – if ever – heard an objection to the premise that these sites provide a true CV for a programmer.

That is to say that no one seems to take account that one of the – if the the  – largest factors that stands over each of the points above: Time.

In short, I don’t believe that any of the aforementioned sites (or related material) serve as a CV. If anything, they serve as a documentation of our history in what we’ve been doing.

There’s a very big difference between the two, and if we end up thinking that they provide us with some type of CV, then we may run the risk of missing out on really good contributors, developers, authors, and so on.

Continue reading

Adding Tabbed Navigation in WordPress for Custom Menus

One of the nicest features of the latter versions of WordPress includes the custom menu system. Although people can always introduce too many areas in which custom menus can be introduced, the core feature and customization options make it possible to do some really cool stuff with custom menus.

Case in point: With many of the popular front end frameworks that are now available, such as Foundation and Bootstrap, it’s really easy to add tabbed navigation in WordPress in templates, widgets, and so on.

Though there are a number ways of to do this, one flexible way that I’ve used multiple times requires two things:

  1. A function for retrieving the post IDs for the post types contained in a custom menu
  2. An instance of `WP_Query`

At that point, all you need is the name of the menu for which you want to retrieve the post IDs.

Continue reading

« Older posts Newer posts »

© 2026 Tom McFarlin

Theme by Anders NorenUp ↑