blakers
Forum Replies Created
-
This was a vanilla install with no additional plugins.
Forum: Plugins
In reply to: [Dave's WordPress Live Search] Relevanssi missing results@Hkroed sorry no, the code above would have to be a change made to the actual plugin code.
Alternatively you may be able to implement your own filter using code similar to the code in the second screenshot.
Forum: Plugins
In reply to: [Dave's WordPress Live Search] Doesn’t show 1 resultThis is because of https://ww.wp.xz.cn/support/topic/relevanssi-missing-results/
Forum: Plugins
In reply to: [Dave's WordPress Live Search] Relevanssi missing resultsI think this is definitely a bug, but I think the problem spot is actually where it’s passing the maxResults parameter when applying the filter:
$wpQueryResults = apply_filters( 'dwls_alter_results', $wpQueryResults, -1, $this );There’s a hardcoded -1 being sent to as the max results for the filter but I think this should really be the max results option, which is modified before being applied as the post_per_page in the pre_get_posts action. Anyway, I think that line should be something like:
$maxResults = $wp_query->get( 'posts_per_page' ); $wpQueryResults = apply_filters( 'dwls_alter_results', $wpQueryResults, $maxResults, $this );