Software Engineering in Web Development, Backend Services, and More

Tag: WordPress (Page 199 of 220)

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

Save Custom Post Meta – Improving The Code

Comments are closed on this post. See the updated version for more information.

Last week, I was talking to a couple of developers on Twitter about some of the code that’s required to save custom post meta in WordPress when working with plugins or themes.

For the most part, good serialization functions are consistently formatted in the same way:

  • First, we check for security. If the security check fails, then we exit the function.
  • If security passes, then we proceed with our serialization functionality.

The thing is, the security checks are generally the same thing across the board so much so that you may even consider it somewhat of a boilerplate.

This seems like an opportunity to improve developer’s processes a bit by abstracting out some of the code that is used to save custom post meta data.

So let’s try this:

Continue reading

How To Get The Post ID By Post Meta Value

One of the nicest and most flexible aspects of the WordPress API is the ability to associate meta data with certain models – for lack of a better term – in the database.

That is, we can assign meta value to Users, Posts, Authors, and so on.

Retrieving the data is typically trivially easy. Simply supply the ID of the model in question and then pass the key value for said post meta.

But what if you need to get the post ID or post meta key by the meta value instead?

Continue reading

Less – A Minimal WordPress Theme By Jared Erickson

When it comes to sharing resources, I try to do a good job of publishing that stuff that I’ve found useful or that I don’t think is necessarily getting the attention that it deserves.

The majority of my friends who are developers or designers maintain their own blogs and publish their own stuff, so I rarely see the need to cross-post any content.

But there are times I make exceptions and such is the case with Less – a free minimal WordPress theme.

Continue reading

How To File and Manage a WordPress Plugin Bug Report

When it comes to WordPress development, there typically tends to be two camps (with a third that’s on the rise):

  1. There are theme developers
  2. There are plugin developers
  3. Then there is the growing field of application developers

Personally, I’m a fan of building plugins. Obviously, it’s not because I have anything against building themes, but I’m a programmer – not a designer – by nature, so I add to the WordPress experience through functionality rather than functionality and design.

In fact, I think if I had to design, it’d probably take away from the experience :).

But plugins are software and there are problems that have existed as long as software has existed. In fact, entire markets have been created around said problem: filing bug reports.

I’m not here to provide the ultimate solution for how to provide a WordPress plugin bug report – if that existed, it would have been solved long before today; however, I do want to share a couple of things that I’ve noticed.

Continue reading

« Older posts Newer posts »

© 2026 Tom McFarlin

Theme by Anders NorenUp ↑