Software Engineering in WordPress, PHP, and Backend Development

Tag: WordPress (Page 141 of 219)

Articles, tips, and resources for WordPress-based development.

Check To See if a WordPress Post Has a Term

In yesterday’s post, I shared how to determine if a given term has a child term. The idea behind doing this is to check to see if a given WordPress term has a child and if the child is actively applied to the post (or post type) in question.

But there’s a caveat that I didn’t mention:

Just because a term has a child doesn’t mean the term itself is actually active.

This means that you could technically be getting a false positive if you’re using the previous method as your sole means to determine if a term has a child. Instead, you need to do one more thing: Check to see if the post has the term applied to it.

Continue reading

How To Check if a WordPress Term Has a Child

If you’re in the process of working with hierarchical terms, then there’s a chance that you’re eventually going to need to know if a given term is the parent to another term.

For example, let’s say that in one of your templates, you’re responsible for displaying a list of all of the terms that do not have children for one reason or another (or maybe you’re responsible for display only terms with one children or another).

Whatever the case, this is a relatively straightforward operation to do assuming that you have the term’s taxonomy readily available.

Continue reading

What Are You Doing Inside of WordPress?

I know – the title of this post is kinda weird, but I figured it made sense given yesterday’s topic (that is, what are you guys and girls focusing on outside of WordPress in the coming year?).

After all, just because we’re looking to focus on things outside of WordPress, that doesn’t mean that we’re going to be moving on or moving away from WordPress.

And since WordPress is comprised of so much – that is, core developers, plugin developers, theme developers, documenters, teachers, educators, event organizers, and so on – I’m interested in seeing what you’re planning to do in the coming year, as well.

Continue reading

What Are You Doing Outside of WordPress?

The end of the year usually breeds one of two types of posts (or, in some cases, both!):

  1. A look back over the year summarizing everything that you accomplished (or discussing what you didn’t get accomplished),
  2. Your plans for what you hope to get done in the New Year

And I’m no exception.

Granted, I’m not one that’s big on resolutions – I tend to think that the best time to start something new is whenever you decide to start something new, but I know that bringing in a new year brings with it that feeling of starting over or a clean slate and with that comes ideas for what you hope to get done.

Continue reading

Using WordPress as a Backend

These days, it’s hip to say that you’re either working with a framework or you’re working with a content management system.

And, for one reason or another, Team Frameworks frowns upon using a CMS for building a site because it doesn’t require writing code, and Team CMS laughs at the idea of writing so much code to do the same thing they’re able to do without said code.

This is why, in previous posts and in other discussions, I’ve often referred to WordPress as a foundation off of which to build web applications. By that, I mean that WordPress is a content management system and that it is not a framework like Rails, Laravel, or .NET. Instead, its API gives us the ability to extend the application far beyond what it’s able to do out-of-the-box.

And I know, I know. This is all stuff that someone else has said before, but the point that I want to make in bringing this up is how those who are curious about using WordPress as a solution for their data may be writing it off simply because of its branding.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑