Sanitatizing when using the posts_where hook

Your last prepare() snippet should work just fine, check that you have $wpdb declared as global in your function.

Also blank page seems extreme, enable WP_DEBUG if not yet and see if there are any specific errors that cause it.

Leave a Comment