Software Engineering in WordPress, PHP, and Backend Development

Tag: WordPress (Page 148 of 219)

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

One Way To Add Multiple Meta Boxes

One of the things that I like about open source the most is having discussions not only about how a person goes about doing something, but why they’ve chosen a particular route over an alternative.

Yes, reading books, articles, and other material from prolific, well-known, and respected programmers matters – I’m definitely not saying that we should throw that out – but there’s a lot that can be learned from peers who are sitting a couple of tweets, emails, or gists away from you.

Though I generally enjoy seeing how other people have approached their work and understanding the rationale behind it, I’m also pretty open about how I approach certain problems if for no other reason that the garner feedback from those of you who take the time to update gists, add comments, and so on.

Continue reading

Documenting The WordPress Plugin Boilerplate

A little over a month ago, I released the latest version of the WordPress Plugin Boilerplate. The response has been great – more than I was expecting, really but that’s a good thing – and, generally speaking, it’s been overall positive.

The WordPress Plugin Boilerplate Homepage

The WordPress Plugin Boilerplate Homepage

Over the last month or so, it’s become clear that more time and resources will be needed to focus on the Boilerplate and to continue to refine its codebase, its functionality, its documentation, and so on. The bottom line is that I want to make sure that I get the right – or as close to right – as possible during the first try.

To that end, I need some input from others (read: you).

Continue reading

Display an Error if a File Is Too Large for WordPress

If you’re working on a project for WordPress that’s going to allow users to upload files – be it a video, an image, a CSV, or any other type of data – then you’re likely going to be faced with a situation where you’re going to need to determine if a file is too large for WordPress.

Yeah, it's a little too large.

Yeah, it’s a little too large.

What’s considered “too large” can be related to any number of factors:

  • The size of the file is larger than you want to accept (or the file system accepts)
  • A PHP timeout occurs when uploading a file because of its size
  • The file system doesn’t have enough space
  • …and so on.

Whatever the case may be, there are two things that you’re going to need to be able to do:

  1. Determine if the file fits within constraint of the system (whatever the constraint is)
  2. Display an error message to the user before the upload occurs

It doesn’t exactly provide for a stellar experience when trying to upload something only to have it rejected by the server without a proper error message, does it?

Continue reading

WordPress’ Related Posts and Featured Images (Yes, Again)

About two months ago, I wrote about the usability of WordPress featured images.

Though nothing has changed in the last few months, there has been one use case that I find leans in the direction of supporting featured images despite their potential improvement for usability. Specifically, it deals with using the Related Posts feature of Jetpack.

Related Posts without Featured Images

Related Posts without Featured Images

For those who are new to WordPress or this specific feature of Jetpack, Related Posts makes it really easy to add links to similar posts at the end of each post:

The Related Posts feature scans all of your posts, analyzes them, and lets you show contextual posts your visitors might be interested in reading after they’re done with whatever post they’re on.

Nice, right?

Continue reading

The WordPress Way (We’re Doing It Wrong)

For years, the whole “doing_it_wrong” meme has permeated the WordPress development community. Generally speaking, I think that it’s been toned down quite a bit in the last year or two and I consider that a good thing, but recently I’ve begun to see people say they are being chastised for not doing things “the WordPress way.”

You're Doing It Wrong

Granted, this may be something that’s been going on for far longer than I’m aware, but the fact that it’s beginning to reach a point at which we’re seeing a number of different people share this feeling in blog comments is, at the very least, interesting (if not a bit disconcerting).

Honestly, I’m of two minds about it: Telling someone they are “doing_it_wrong” is negative – it’s condescending. And perhaps telling people they aren’t doing it “the WordPress way” is just a flip side of the same coin, but I also think that it just has a more positive, approachable spin to it (depending on how it’s shared, I guess).

Whenever anyone starts off a discussion with a negative then proceeds to tell you why you’re wrong, you can’t help but feel a bit defensive and possibly even offended.

Using a more positive approach yields better conversation, doesn’t it?

And I think there’s something about “the WordPress way” that is more accessible and approachable. Though it still indicates that something isn’t being done correctly, it does come with the implication of “this isn’t the WordPress way, here’s how you should be doing it, and here’s why you should be doing it this way.”

And in that respect, it does matter whether or not we’re doing something correctly within the context of our software.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑