0
With some vulnerable solution posted here, I come with a bit simplified and sanitized version.
First, we create a function for the posts_where filter which allows you to only show posts matching specific conditions:
function cc_post_title_filter($where, &$wp_query) {
global $wpdb;
if ( ...