Exclude post_content from search
-
Hi,
I’m using ACF Better Search and it works great.
My client has asked me not factor in ‘post_content’ when searching for results.
This is pretty easily accomplished in wordpress with:add_filter('post_search_columns', function($search_columns) {
// default ['post_title', 'post_content', 'post_excerpt']
return ['post_title'];
});However this seems to be overwritten by Better Search and post_content get searched.
Is there any solution to this other than disabling the plugin?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Exclude post_content from search’ is closed to new replies.