How to properly escape values in meta query
The problem is that you’ve interpreted wpdb::esc_like as a literal copy paste, and not a direction, and used it as a static function, when it is not a static function. Good: global $wpdb; $foo = $wpdb->esc_like( $bar ); Bad: $foo = wpdb::esc_like( $bar ); Other things to note: The & in &$wp_query ) is a … Read more