PHIL KURTH

Email

October 2019

How to unset WooCommerce order actions

If you’ve ever gotten down to business with WooCommerce, you’ll know how flexible that beast can get. Of course, the flip side to that is how gnarly things can get in there as well but I guess that’s the double-edged sword we live with when building complicated things out of WordPress. One little handy point […]

October 2019

Use a WP CLI command to prepare your plugins for release

If you’ve built plugins you’ve undoubtedly spent a whole lot of time and energy finishing up on sweet new feature X only to then face the hurdle of having to prep the whole shebang for release. I was tired of hitting that final hurdle whilst working on the ACF Custom Database Tables plugin so I […]

October 2019

Customise the post titles in ACF’s relationship field

If you’ve ever found yourself wanting to modify the post titles in an ACF relationship field, you may have already stumbled across the acf/fields/relationship/result filter. It’s a pretty useful filter when you want to provide some more contextual information next to a post title in the relationship field results list. As with many filters built […]

October 2019

Load an ACF field’s options dynamically via PHP.

One thing I really appreciate about the Advanced Custom Fields (ACF) plugin is the flexibility it offers via WordPress’ hook system. For most use cases, we can do what we need from the admin but now and then I come up against scenarios where it is either necessary or just a whole lot easier to […]

October 2019

Use PHP’s alternative syntax for clearer WordPress templates

I’ve seen quite a few instances of people asking when and where to use PHP’s alternative syntax for control structures and if you don’t know what I’m referring to, check out the PHP documentation for an outline. There’s no hard and fast rule for when to use the alternate syntax but personally, I much prefer […]

October 2019

How to clear lockouts from the awesome Limit Login Attempts plugin via SQL

Ever used the Limit Login Attempts plugin to help safeguard against attacks? I usually find this installed on managed hosts like Pressidium and Flywheel and it’s a very nice plugin and does a solid job. Unfortunately, I get blocked by it now and then which is, admittedly, my own fault as I’m either logging in […]

October 2019

Use generic views with data arrays for a flexible, context-independent UI system

When you start digging into WordPress partials, things really open up on the theme side. Being able to reuse templates is a nice feature and can help keep your code nice and tidy but if your templates are using WordPress’ template tags, you can easily find yourself in situations where you need the markup from […]

October 2019

A PHP class for dumping data to a separate log file

Debugging can be a lot simpler with a nice set of tools. Ideally, breakpoints and stepping through code is the way to go but sometimes it is nice and easy just to dump stuff somewhere. Dumping to the DOM is usually fine but can obviously cause problems on the page render and it can be […]