Software Engineering in WordPress, PHP, and Backend Development

Tag: WordPress (Page 165 of 219)

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

The Dangers of Pricing in WordPress Business Models

One of the business models that is common (although not as common as it used to be) in the economy of WordPress is the unlimited support for for a single purchase. That is, you buy a theme or a plugin, and you pay for the product and the purchase often includes a license for lifetime support.

For those of you who have made a similar purchase, then you’ve likely seen some type of pricing defined like this:

  • $X for the purchase of the product
  • Use the product on Y number of domains
  • Unlimited support and updates

And then the above scheme is tiered such that X and Y change based on the amount of money paid toward the product.

But, like I said, this is nothing new and it’s something that we see frequently see, but anyone who has worked with this particular business or who followed this through to its inevitable conclusion realizes that this is a completely unsustainable business model.

To that end, if more small businesses based on WordPress want to have a better shot of “making it” (where “making it” is defined as staying in business – not some arbitrary amount of money to be made), then this particular pricing model needs to die.

Continue reading

Updating a WordPress Post in the Save Post Action

For those who have worked with WordPress long enough, you’re likely familiar and comfortable with how hooks works – that is, you’re familiar and comfortable with the event-driven design pattern.

Sure, it’s a bit different than many other frameworks and foundations that use MVC, MVVM, and some other remix of the model-view paradigm, but I don’t think that’s really here nor there in terms of which is better. This is what WordPress uses and it’s easy enough – and powerful enough – to work with once you’ve got it.

But that’s not to say it’s not without it’s nuances.

For example, one of the challenges of working with event-driven design is understanding how hooks work throughout the page lifecycle, how it’s possible to actually get stuck in an infinite loop if you’re not careful, and how to work with the various hooks to prevent this from happening.

Continue reading

Thoughts on WordPress Developers, Communities, and Products

For those of you who are involved in working with building things for WordPress- specifically, premium plugins and themes – then you’re likely plugged closely into what many refer to as “the WordPress community.”

Granted, I’m not saying it’s not a community – it is – but it’s just part of the community, right? I mean, the word encompasses people who use WordPress to blog, people who are fans of the software, those who have contributed to it, those who build things with it, and so on.

All that to say, the community has a variety of facets.

And the challenge to this is that when we spend so much time with our subset of the community, it’s easy to accidentally develop a degree of tunnel vision such that we become at least partially focused on writing things, designing things, or buildings things with our part of the community in mind rather than our customers.

Continue reading

A Dilemma: Hiding Elements with The WordPress Theme Customizer

When it comes to working with the WordPress Theme Customizer, one of the options that you’re likely to see in other themes (or that you’re likely to introduce in your own themes) is an option that is responsible for toggling the visibility of an element.

For example, if a text box is empty, you may want to hide an element. Or, more simply, perhaps a user will need to click on an checkbox to toggle whether or not to display an element.

But this presents a dilemma: Either we can send all of the information to the browser and control its visibility using a class name, or we can send less code to the browser but lose a smooth user experience when using the Theme Customizer.

Continue reading

Steps To Writing Clean WordPress Code

I’d like to think that one of the things that most good developers continually strive for is writing the cleanest, most maintainable code possible.

Personally, I don’t know if there is an actual point at which you reach it – it’s the whole journey-not-a-destination thing – but that doesn’t mean that we shouldn’t continually aim to get better at what we do. In our case, that’s writing clean WordPress code.

The thing is, there’s only so far you can get on your own. You can read a number of books, follow the advice of some high profile programmers, and read as much of the “academic” material that you can get your hands on – and I think all of the above is great – but, at the same time, it only goes so far.

To that end, I think it’s worth seeking out other people in your same field to help provide some level of mentorship on how it relates to writing clean code because here’s the thing:

As much material as we can read written by other people, nothing beats interacting with those who are writing code in the same language(s) for the same APIs under the same coding standards and who are farther along than you in experience.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑