Software Engineering in Web Development, Backend Services, and More

Author: Tom (Page 103 of 432)

Adding Custom WordPress Image Attributes

When it comes to working with the_content, it’s straightforward.

  1. Set up a filter that’s hooked into the_content,
  2. define a function that accepts the incoming post content,
  3. make your changes,
  4. return the modified content.

And most of the time, this is all that’s needed. But there are times in which you may want to do more advanced things.

For example, perhaps you’ll want to include content from an external template. Or maybe you’ll want to add attributes to images that you find in the post.

Continue reading

Monthly Memberships Now Available

One of the things that I’ve wanted to introduce on this site for a long time now is a members-only section.

I’ve shared a bit about it before, but I’m excited to announce that it’s officially live, accepting registrations finally, and ready for members.

Monthly Memberships Now Available

But before you sign up or poke around at the various pages about it, I thought it would be helpful to break everything down for those who are interested.

Because not only are memberships being offered, but other changes that affect others are, too.

Continue reading

It’s Not About Finding the Perfect JavaScript Templating Engine

We’re currently working on a project that communicates with a third-party API. The response data is returned in JSON format, so we’ve opted to take the response and pipe it into a JavaScript templating engine.

The challenge: Finding the perfect JavaScript templating engine.

Well, sort of. The thing is, finding a templating engine is pretty easy. There are plenty of them. And many of them work the same way. I’m not sure I’m in a place where I could say I have a “favorite.”

Continue reading

WordPress Debug Logs Are More Important Than You Think

When it comes to working with WordPress, the Codex does a good job of showing how to configure the application for debugging.

In short, you add the following to your wp-config.php:

// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );

// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );

// Disable display of errors and warnings
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );

There’s more you can add, but this is the general idea as to what I find useful.

But why bother covering this?

Continue reading

Updating Subsequent Events in Event Calendar Posts

This is a really nuanced case but I thought it might be worth trying to generalize for a post for anyone who may be working with future events with Modern Tribe’s Events Calendar.

Say you’re setting up some recurring event and within the body of the event (or, more appropriately, the post_content) you want to say something like:

It’s been N-years since [this event] occurred.

The thing is, each subsequent event will obviously be one year greater than the one before it. So you can’t necessarily hardcode the value into the events without it being placed into the post content of every event.

So what’s one way to tackle this?
Continue reading

« Older posts Newer posts »

© 2026 Tom McFarlin

Theme by Anders NorenUp ↑