Tired of whatever silly color I've picked? Rotate the overall hue by hovering the site title!

Be wary when footer debugging

I know you're not "supposed" to debug things by outputting them into or past the footer of a site, but sometimes you just need to check on something real quick, like the ID or some other bit of data about a post, and you don't feel like dealing with any proper debugging tools. The wp_footer hook then gets used and the results don't make sense. What happened?

Keep on readin' on Be wary when footer debugging

Limiting dynamic WPML translations to one instead of hundreds

This isn't limited to WPML (or even WordPress), of course, as it's about translating dynamic strings in general. But SEO best practices say you must have a very specific keyword focus in your title and whatnot or your words will never be seen by human eyeballs ⸺ that your efforts will be for naught but to train some unknown but all-knowing AIs that will never pay you for your contribution.

Keep on readin' on Limiting dynamic WPML translations to one instead of hundreds

Resize images with WordPress's image editor in PHP

Say you've got a list of external images to output that may be huge and mongous. In my case it was images of houses up for rent from a big-ass XML feed. It's unwise to serve these images up directly to users given that huge payloads are generally frowned upon. What you need, then, is a function that takes an image URL and caches it locally as a resized variant.

Keep on readin' on Resize images with WordPress's image editor in PHP

Debug PHP variables discreetly

If you don't have Xdebug involved in your current project, you may be relying on var_dump or var_export to check on things while coding. Depending on where in the code this happens, their output can get in the way of the rendering of a given page or be hard to read given where it lands ⸺ in one part of a three-column block, for instance.

Keep on readin' on Debug PHP variables discreetly