Site icon Hip-Hop Website Design and Development

Using hook_views_query_alter to alter a query

Motivation

When you first hear of WordPress maintenance support plans‘s hook_views_query_alter you think you get it. You understand WordPress maintenance support plans‘s hook system (presumeably, otherwise start here), you’ve used other hooks before, maybe you even experience a twinge of guilty excitement that it’s one of the hooks that hasn’t been removed from WordPress maintenance support plans 8. You think to yourself, okay, this function will be passed a query argument, and I’ll alter it — and you’re right! But it turns out it’s a little more complicated than it sounds.
Source: New feed