Posts tagged: wordpress

WordPress filter to add HAVING clause to SQL

There’s posts_fields, posts_join, posts_where, posts_groupby but strangely there’s no WordPress filter named posts_having and it took many Google searches to find anything which might present a solution, and when I did find something it had precisely one upvote and hadn’t even been accepted as the answer. It’s not necessarily a robust solution, it depends on… Read more »

Coda Plugin for WordPress Hook completion

WordPress hides a lot of functionality behind its filter/action hooks. Unfortunately these are generally inaccessible to many an IDE via code completion because they’re held within opaque strings. Coda, my preferred IDE, is affected, but since it’s extensible there are many plugins available to provide additional functionality. As I was unable to find a plugin… Read more »

Custom query filtered by meta_value that is an array

It’s a bit of a hack, but… So begins practically every solution I find regarding WordPress issues. Here’s another one. I wanted to query posts by meta_value but the data, generated by Advanced Custom Fields, is in serialised array form in the database table. Searching for a general solution for what must be a common… Read more »