The Search & Filter Pro plugin has some neat functionality to allow users to refine their searches in just about any way you might wish. Not only that, but it’s pretty slick in delivering updated results via ajax with very little configuration. So it’s been my go-to choice whenever a site needs anything more than the most basic search function.

It’s not too hot on the look though.

Read More →

Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth.

Sherlock Holmes

Over the years I’ve learned it’s always my fault. If something isn’t doing what I expect it to, then I’ve messed up somewhere – so I look to my code, and the most recent changes, to see where the problem is.

Read More →

In adapting a twitter feed plugin to my needs, I came across a weird problem where transients wouldn’t save, and worse, it was intermittent. I at last isolated the problem to emojis, and found this post on the subject which explained the problem.

Read More →

One of my Bulk Attachment Download users suggested I make it work for grid view as well as list view, and since this was entirely sensible and something I should have looked at sooner, off I went. Most of the work was relatively straightforward, but I hit a bump when trying to respond to users selecting attachments for download.

Although I could get a jQuery function to react to a click event on the image, nothing would happen when clicking on the check / uncheck icon at the top right of each image.

Read More →

When I’m developing a site I always have an st_error_log( $var ) function that writes to an error log so I can dump variable data there to figure what’s going. On three separate occasions now I’ve had a wtf moment when it seems as though a filter or action has been firing twice for a single page load.

Read More →

A few years back I wrote about how to get Fancybox 1 working on WP galleries – specifically how to add a rel tag to an image anchor tag so that images would appear grouped in their correct galleries.

That all became obsolete with the introduction of the Gutenberg block editor, as images and galleries are now inserted into posts and pages in completely different ways.

Before, there were plenty of filters available to change image and wrapping anchor tags relatively easily, but my attempts to do something server-side and php-based with the block editor met with total failure. Instead I ended up upgrading to Fancybox 3 and using jQuery to sort pretty much everything out.

Read More →

Sorting out capabilities for custom post types is tricky. At least I think it is – mainly because it’s hard to figure out what you’re supposed to be doing. Both the code and the documentation seem somewhat opaque to me.

So this is my attempt at unraveling how it works – together with some different ways you might want to set up your custom post types. And it is an attempt, so if I’ve got something wrong or I’m not making sense, please let me know…

Read More →