Software Engineering in WordPress, PHP, and Backend Development

Category: Articles (Page 69 of 258)

Personal opinions and how-to’s that I’ve written both here and as contributions to other blogs.

Dynamically Centering an Element in a Container Using CSS

When it comes to writing about development, I don’t often talk about things beyond PHP and JavaScript mainly because I work with those languages more than others.

I mean, yeah, CSS is part of the deal as is HTML, but it’s expected these days, right?

So if there was ever a quick tip for me to offer regarding CSS, this is it (though maybe I should write more?). It’s hard when Chris does such an awesome job running CSS Tricks, but I digress.

Anyway, here’s the problem and the solution.

Continue reading

Working with Classes, Templates, and Partials in WordPress

When I sat down to begin this post, I planned to write something far more involved that I what I’m going to share. Initially, I wanted to walk through one of two things:

  • The Complete Guide To Setting Up a Development Environment,
  • Integrating Code Quality Tools into PhpStorm

The first would be focusing on a variety of other things I’ve talked about, tying them all together, and having a definitive reference. But this is something that I want to take time to put together to make sure it’s done right.

The second is one that I think is important but I’m in a bit of a transitional phase with some of my own tools. Until that’s done, I’d rather not write about it.

Even still, there’s always something to cover, right? So today I’ve opted for something simpler: Breaking down the use of classes, templates, and partials in WordPress plugins using a simple example.

Continue reading

Uploading Files in WordPress Revisited, Part 2 – The Server Side

Before jumping right into the code for this, I wanted to mention two things:

  1. Yes, I’ve covered this in some detail a while back,
  2. And this is the second part of a two-part series.

If you’ve not read the first part, do it first. The idea is that the code will work in conjunction with what I’m going to cover in this post to make sure that both the client-side and the server-side are covered.

Ultimately, the reason for breaking it down like this is not just to make sure that things are done correctly, but also to make sure that the user has the most positive experience possible.

With that said, here’s how to go about uploading files in WordPress on the server-side.

Continue reading

Uploading Files in WordPress, Revisited: Part 1 – The Client Side

Years ago, I wrote about how to upload files in WordPress from the administrative area. This post is practically an update to that post, but it covers new considerations that I make and some other processes that I think are necessary.

For this post, I’m going to work off the example of uploading a PDF file and how also to make it available in the Media Library.

In doing so, I’m also planning to cover some considerations that should be made on the client-side and the server-side as well as things for which to look for whenever someone is transferring information across the wire.

Continue reading

« Older posts Newer posts »

© 2026 Tom McFarlin

Theme by Anders NorenUp ↑