Closed theodejager closed 1 year ago
I suppose it's possible to add a filter hook there. I think this should also work:
add_filter( 'relevanssi_light_boolean_mode', '__return_true' );
add_action( 'pre_get_posts', function( $query ) {
if ( isset( $query->query_vars['s'] ) ) {
$query->query_vars['s'] = '*' . $query->query_vars['s'] . '*';
}
} );
thanks for the tip, works!
Hi, first of all thanks for the plugin, I really like the code and implementation!
I was actually fixing the same problem this plugin sets out to do by squeezing all post meta (mostly ACF flexible content) into an unused post_content or post_excerpt, but this does it faster and in a neater way.
However, what really lacks in comparison to the regular WP search (and my makeshift solution) is the lack of partial matches.
Related to this support point: https://wordpress.org/support/topic/possible-to-use-partial-matches/
Is it possible to add an option or filter to the plugin so that boolean mode can be triggered on/off and have a wildcard asterisk appended to the match query?
Something to this effect?
Just as an example, glad to hear of a better way of solving this problem. Thanks!