Software Engineering in WordPress, PHP, and Backend Development

Author: Tom (Page 378 of 427)

Why I’m Against Placing Custom Hooks in WordPress Themes

One of the things that I my team and I are often asked is if we’re ever going to place hooks in our core theme files for Standard. The short answer is “no,” but there’s actually a few reasons why I’m personally against placing custom hooks in WordPress themes.

Although this is stemming largely from building and managing a commercial theme, the discussion isn’t limited to that particular scenario. Rather, this is something that I’ve actually discussed with a number of other WordPress users and developers.

Overall, I’m generally against placing custom hooks in WordPress theme files, so I thought I’d share my reasons why I’m not a fan of doing this.

Continue reading

How I Organize My Files When Developing WordPress Themes

I recently shared how I organize my files when developing WordPress plugins, but since I also work with themes and have recently been building two applications using WordPress, I thought I’d also share my thoughts on organizing WordPress theme files.

For what it’s worth, I think that some developers – especially beginners – often try to make the plugin model fit the theme model or vice versa, and although both types of projects are aimed specifically at WordPress, they require different approaches.

Simply put, theme file organization differs from plugin file organization. With that said, here’s how I organize my files when developing WordPress themes.

Continue reading

Resolving wp_redirect and the “Headers Already Sent” message

I’ve been working on building a web application in WordPress on which I’m implementing a set of rewrite rules to introduce RESTful routing into the application.

Once the application is done, I hope to provide a significantly more in-depth post on how I built it, but in the mean time I figured I’d cover how I’m handling certain challenges that I’ve faced in development.

In this case, I needed to fire a call to wp_redirect after a certain event happened, but kept getting the PHP error:

Cannot modify header information - headers already sent by (output started ... )

Here’s how I ended up resolving the wp_redirect headers already sent message.

Continue reading

Use Markdown To Write Email (and Other Rich Text)

I dig markdown. Aside from the obvious uses on GitHub, I’ve also begun to use it in changelogs, README files, and general text-based notes that I take.

The other day, I sent the following tweet:

And it’s true. If I could, I’d use markdown to write almost anything in place of using rich formatting. Once you get the hang of it, it’s faster, it has clean syntax that are even easy to follow if they aren’t styled, and it’s much simpler than, say, markup (hence, ahem, markdown).

Thanks to a tip from Bobby Shirley, it’s completely possible – and easy – markdown email.

Continue reading

Thinking Holistically About WordPress Plugins as Products – The User’s Experience

This is the final post in the Thinking Holistically About WordPress Plugins as Products series.

Throughout this series, I’ve been sharing my thoughts on what it means to think holistically about building WordPress plugins as products rather than simple utilities for blogging.

In the first post in the series, I defined this by saying:

Thinking holistically about WordPress Plugins is about the top-to-bottom, end-to-end experience that goes into building and that will go into using the product.

And in the second post, I shared my thoughts on the top-to-bottom – or the developer’s experience – of approaching WordPress plugin development as if we’re building quality products.

Similarly, I consider the end-to-end aspect of development to be epart of the WordPress Plugin user experience and that it’s arguably just as important as the developer’s experience.

So in attempt to continue thinking holistically about WordPress plugin development, here are my thoughts on the user’s experience – or the end-to-end aspects – of development.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑