Software Engineering in WordPress, PHP, and Backend Development

Tag: WordPress (Page 153 of 219)

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

WordPress Theme Updates Are New Themes

I know that there are different ways that people approach building WordPress themes and I’m not one to argue that there’s a single right way to do it. Sure, some ways are better than others, but that’s true of a lot of things.

Personally, I approach building themes, plugins, and so on as I would as if I was building some type of software. That has to do with my background. Similarly, someone who has a background in design and in front-end development will conceptualize what they are building in a different way.

Like I said, all of that’s fine (in fact, I think it’d be interested to see how different people view building themes, but I digress), but I do know that one common thing we always have to think about as it relates to updated our WordPress themes is the actual front-end design.

Specifically, does it make sense to completely change the design of a theme for a different version of the theme?

Continue reading

Single Page Tabbed Navigation in WordPress

In a couple of recent projects, I’ve been tasked with adding tabbed navigation to various WordPress templates. The thing is, these tabs work in such a way that all of the information is loaded on the page so when the user clicks on the tab, the contents of the page appear without having to do a page refresh.

Tabbed Navigation

 

In some cases, it may be best to load pages via Ajax, in some cases, it’s better to load things up all in the first page load. This particular post is about the best strategies for that (that’s a debate for another post).

Continue reading

JavaScript and WordPress Page Performance

Last week, I was having a conversation with a fellow WordPress developer about improving page performance as it relates to JavaScript. Specifically, we were talking about if it makes sense to load JavaScript sources at the bottom of the page.

If you’ve done any client-side development for a moderate length of time, odds are strong that you’re well-aware that it’s considered a best practice to include JavaScript sources before the closing body tag rather than in the head element.

This is because it allows the browser to render the page more quickly without waiting for larger files to download (and JavaScript files are normally heavier than HTML documents because of their file size and the processing they do on the DOM).

There’s a lot that could be said with respect to this in terms of general web development, but in terms of WordPress, opting to enqueue your scripts at the bottom of the page versus the top of the page may require a bit more consideration.

Continue reading

Why You Should Write Meaningful WordPress Meta Keys

If you’re someone who’s building solutions with WordPress regardless of if they are themes, plugins, or applications, then odds are you’ve had to deal with saving some type of information to the database.

Granted, anytime you create a post, a page, or anything that stores data, you’re entering information into the database.

But that’s not what I’m talking about.

Instead, I’m talking about times when you’re having to work with the Options API, the Theme Customizer API, or one of the meta APIs (like the Post Meta API). In this case, you’re working with the core application to save and retrieve information from the database.

When doing this – especially in development and possibly in staging – it’s likely that you’re having to write the code, run a test (automated or not), and then take a look at the way the record is stored in the database to make sure it saved as expected.

In my experience, there are a handful of things that can be done to make this process a little bit easier and make your code a little bit cleaner and one of these has to do with writing meaningful WordPress Meta Keys

Continue reading

Aim for a Single Way to Achieve a Single Task

When it comes to user interface design and user experience, I’m no expert (nor have I ever claimed to be). I’m barely an intermediate. if even that. I’m fortunate enough people to have peers who are willing to review certain projects in order to help tighten up certain aspects of my work.

I don’t think we should ever be afraid or ashamed to ask people who are more skilled than us in a certain area to help us out (or to pay them, even!). After all, we have nothing but to benefit from it.

This doesn’t mean that a couple of ideas, rules, and general practices haven’t come up over the years.

For example, one of the rules of thumb that I have whenever I am working on a user interface is to try to make sure the user only has one way of achieving something.

In other words, I don’t like it when there are multiple ways to do the same thing. I think that it confuses the user, it complicates the code, and it makes it more difficult to maintain over time. The code aspect of this is enough content for another post.

For now, it’s just about finding a single way to achieve one task.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑