Tom McFarlin

Software Engineering in WordPress, PHP, and Backend Development

Page 232 of 428

How To Find Posts Without Meta Data

I’ve been working on a very simple plugin lately – more of which I’ll talk about next month – that’s serving as a demo for a larger project that I’ve been working on.

In short, the plugin gives editors the ability to exclude posts from the main index feed of the WordPress blog. This means that the blog post is still accessible via direct URL, but it won’t show up in the main feed of the site.

This is achieved by the following process:

  • Introduce a meta box into the post editor dashboard
  • Add a check box that gives the user the ability to check whether or not to exclude the post
  • Use a hook to exclude those posts form the dashboard

It sounds easy enough, doesn’t it?

Continue reading

My Suite of Apps: SimCity BuildIt

Rarely do I talk about games on this blog, but considering I’ve been doing a few posts on the types of apps I have running on both my desktop and my laptop, it seemed fitting to share it.

To be honest, I don’t play many games. I have an obsessive personality and if I get into something too deep, then it can end up costing me far more than a few hours lost here or there (and that’s not a good thing when you’re trying to run a business, trying to raise to kids, and trying to generally be wise with the way that you’re spending your time).

Anyway, when I was young, I was completely enamored with SimCity 2000 (“reticulating splines“). Though I don’t know if I was really old enough to get all aspects of the game, I was pretty good about filling up a map with a city and then generating revenue.

SimCity 2000

Their tax dollars at work

But then I had to get out of it for a bit. The games continued to get more and more advanced and school, life, and so on became busier and busier.

And then, a couple of weeks ago, SimCity BuildIt was released.

Continue reading

Disabling Post Comments on WordPress: Why?

A few days ago, I was talking with a friend about a post I’ve recently written in which I had disabled the comments.

The general question is basically:

Why disable comments?

And though it was a good question. Generally speaking, though not always, I try to be very deliberate with the choices that I make as it comes to how this blog looks (though it’s getting dated, I fear), functions, and what I opt to share.

But what kind of answer is that?  It’s not.  Continue reading

Open Source WordPress Themes: Going On GitHub

Over the last year or so, I’ve been hesitant to open source Mayer. I mean, by default, the theme is open source, but I mean placing it on GitHub. Coincidentally, I’ve never had a problem open sourcing any of my plugins no matter how low-quality they were (at least at the time – I mean, I didn’t know any better!).

I still have a lot to learn but that’s a topic for another post.

Anyway, so what’s the rub? That is, why is the only way to grab a copy of the source code of open source WordPress themes to purchase them? It kind of feels a little bit anti-GPL doesn’t it (and to be clear, I do not want to start a debate on this)?

The current GitHub page for Pressware

The current GitHub page for Pressware

But the software should be freely available. It’s the support – and the other perks that come with that – that matters the most, right? And I’ve watched other people be wildly successful with open sourcing their work (Pippin Williamson being one of them). Continue reading

Using WP_Query To Search For a Person

One of the most powerful features of WP_Query is that it allows for us to create a type of mini-search engine within the context of our WordPress projects.

No, this isn’t as sophisticated as something or someone who’s actually in the search business, but you can create some pretty elaborate queries using WP_Query.

Conversely, you can also create some pretty simple queries that do a good job of returning a subset of data. For example, say you’re interesting in using WP_Query to search for a person. There may be a little bit of criteria that the user has to provide, but doing something like this is usually really easy.

Continue reading

« Older posts Newer posts »

© 2026 Tom McFarlin

Theme by Anders NorenUp ↑