Software Engineering in WordPress, PHP, and Backend Development

Author: Tom (Page 368 of 427)

My Preferred WordPress Hosting

Preferred WordPress Hosting

I’m a big fan of Site5

Earlier this week, I had a couple of people shoot me an email asking who I preferred in a WordPress host. The truth is, when it comes to preferred WordPress hosting, both developers and designers have their vendors of choice.

I’m no different.

As you can tell from the screenshot above, I’m personally a big fan of Site5. This is not a sponsored post – simply a reason as to why I prefer these guys.

Continue reading

Quick Tip: Including jQuery in WordPress The Right Way

Much has been said on the subject of properly registering and enqueueing scripts in WordPress, so I hate to write yet another “including jQuery in WordPress the right way” post, so I’ll attempt to cover it from a different angle.

Because jQuery ships with WordPress, it’s really just a simple matter of making sure you call:

wp_enqueue_script( 'jquery' );

In your functions.php file.

But that’s really only half of it. After that, you have a matter of actually setting up your JavaScript source.

Continue reading

Writing Clean, Maintainable Custom WordPress Queries

Recently, I was having a conversation with a fellow developer via email about maintaining a separation of concerns in custom WordPress queries and WordPress templates.

The gist of the conversation boiled down to this:

Is it a good idea to keep custom queries in the template files?

A couple of years ago, I would’ve said yes but as I’ve begun to work on more complex projects, I’ve changed my mind: I’m actually a fan of keeping custom queries in functions.php.

I think that this keeps code more maintainable, cleaner, and easier to read, though I’m not sure if this is the most common practice.

Continue reading

How To Programmatically Create a Category in WordPress

If you're an advanced developer or just want the TL;DR version of this, skip to the code.

The majority of the time that I’m working on a contract project, there’s a need to programmatically create several parts of the website that occur during theme setup. Often times, this includes creating posts, users, and/or setting templates.

Ultimately, the goal is to make the user’s experience as nice as possible: They install the theme and the site, to a degree, has bootstrapped itself.

As with the aforementioned parts of a site, it’s also common to need to create a category, or categories, during theme setup. WordPress provides two ways of doing so, one of which often results in a PHP fatal error.

Here’s how to programmatically create categories in WordPress and do so without generating any errors.

Continue reading

My WordPress Development Toolbox

I update this post as my workflow changes. This post was last updated on January 10, 2014.

Periodically, I’ll get emails or comments asking about the various tools that I use in my workflow. You’ll rarely hear me saying that I think any given developer should be using any given piece of software.

Instead, I think that out of all the tools that we have from which to choose, we’re naturally going to like some rather than others – there’s not always going to be a general consensus. Because of that, I’m more likely to share what I like rather than what I suggest.

Since blogging is just as much for the readers as it is for the author, I thought I’d take some time to share what tools I use on a daily basis. Consider this a comprehensive list of tools in a WordPress Developer Toolbox.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑