Software Engineering in WordPress, PHP, and Backend Development

Tag: WordPress (Page 147 of 219)

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

Updated WordPress Themes Are Different WordPress Themes

Designers and developers, by their nature I think, are attracted to new things if for no other reason than to see how it’s designed, how it’s put together, how it functions, and so on. I don’t consider that a positive or a negative – it’s just a trait that some people have (and certain types of people exhibit it more than others).

New and Different WordPress Themes

That curiosity matched with the desire to constantly be improving at one does do for a living (or for a hobby) is what separates those who see the gig as “just a job” and those who see it as what they’re dedicating their lives to doing.

Yes – it can be expensive: Some like to purchase new devices as soon as they are released or new products as soon as they are released in order to familiarize themselves with them, and then to try to bring back what they’ve seen, learned, and experienced and build it into whatever they’re focused on creating.

But when you bring this approach into something like WordPress theme design and/or theme development, it has the obvious potential to improve future work but it can also negatively impact existing work.

Continue reading

Organizing WordPress Meta Box Code

When working with themes or public-facing views for a website, WordPress components can generally be thought of in three distinct areas:

  1. Templates are used for rendering the view (that is, the markup and the styles) of data.
  2. Partials are reusable fragments of templates.
  3. Helper Functions are used to help process, format, and generally work with data.

As far as templates and partials are concerned, these are relatively common with themes or working with anything on the front-end, but we don’t see it as much as we do when talking about the context of the Dashboard.

But when it comes to working with the back-end, all of these things are still applicable. Sometimes you’ll see them in isolation – like with helper functions – other times, all three things can work together such as in the case of meta boxes.

That is, you have a function for defining the meta box, a function for rendering the meta box (which can include a template), and then the template may have multiple parts – or partials – such as the contents for various tabs.

Continue reading

Display Post Meta Data Error Messages in WordPress

One of the things that’s nice bout working with post types – custom or standard – in WordPress is that it’s really easy to hook into the serialization process in order to handle the data. This means that we have the ability to sanitize, format, read, access, modify, verify, etc. all of the data with the post type and with the post type’s meta data before it’s written to the database.

WordPress has a pretty consistent way of displaying error messages throughout the application. Really, it’s pretty consistent in how it displays all types of messages – success, updates, and errors – throughout the  system.

Let’s say that you’re working with a WordPress meta box, several of its fields are required, and you want to:

  • verify the input has been specified
  • either display an error message if it’s not specified
  • or write the data to the database if it checks out

The serialization process is pretty standard stuff, but if you’re looking to make sure required fields aren’t empty and that a error message is displayed whenever they’re not entered, then you’ll need to do some additional work.

Continue reading

Is There Room to Improve Error Logging in WordPress?

I think that one of the best ways to stay current with whatever tools, languages, etc. that you’re working with is to take a look and see what other communities are doing with their tools.

For what it’s worth, I also think that bringing experience from previous projects and/or jobs to new projects and/or jobs is important – you get a chance to continue doing all of the things that worked well, a chance to avoid the things that didn’t work, and a chance to discover a new set of things that work and things that don’t.

One of the more popular tools to come out as of late is Docker. There are a lot of really cool things about it, and there are a lot of articles already being written about it. I recently read one that struck a chord with me and with WordPress-related development.

Especially this quote:

Logging is a critical part of running an application. It’s often undercooked because it’s been here for so long no one think about it anymore. But trust me, when things stop logging, admins start crying.

Is Docker Ready For Production?

Yes, it’s a good read for anyone who likes to see how other developers are doing their thing in another area of the industry and there’s a number of points made that I think many people who have been working in software for a number of years can identify with, but I couldn’t help but ask myself if I’m doing (or we’re doing) enough logging in the WordPress projects I’m (or we’re) deploying.

Continue reading

Programmatically Deactivate WordPress Widgets

If you’re in the business of building themes for fun, for clients, or for purchase within a marketplace or your own store, then there’s a chance that there’s some type of functionality that’s unique to your theme that should be activated whenever the theme is activated.

In my experience, this is something that’s typically unique to niché WordPress themes because they tend to have specific features, customizations, and so on that are relevant to their theme.

Case in point: Let’s say that you’re working on a niché theme that has a number of widgetized areas, but also has very specific widgets for said areas. That is, upon theme activation, you want to make sure that each widgetized area is clear so not to bust up the layout.

In other words, you need to programmatically deactivate WordPress widgets whenever the theme is activated so that the layout of the theme looks as it should when the user activates it.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑