A very strange problem with search query

By default, WordPress searches by keyword. To use a custom query variable for search, you would have to register the custom query variable using query_vars function wpse250276_register_query_vars( $vars ) { $vars[] = ‘ait-locations’; return $vars; } add_filter( ‘query_vars’, ‘wpse250276_register_query_vars’ ); Then you need to use pre_get_posts to alter search query and include your custom taxonomy … Read more

Remove the post_content search from WHERE clause (and CONCAT sql function)

First look how complex is your preg replace. Usually, you may get into errors with that. NODE EXPLANATION ——————————————————————————– / “https://wordpress.stackexchange.com/” ——————————————————————————– \( ‘(‘ ——————————————————————————– \s* whitespace (\n, \r, \t, \f, and ” “) (0 or more times (matching the most amount possible)) ——————————————————————————– post_title ‘post_title’ ——————————————————————————– \s+ whitespace (\n, \r, \t, \f, and ” … Read more