WordPress Search return wrong results
The reason for this is that WordPress searches for matches using LIKE %post%, meaning that any post (that is Post, Page or custom post type object) that contains post in it’s title or content is found. You can alter this default behaviour by using the posts_where action hook. add_action( ‘posts_where’, ‘my_alter_search_where’ ); function my_alter_search_where( $where … Read more