SearchWP Documentation

インストールガイドを表示したり、ナレッジベースを参照したり、SearchWPの多くのフックについて確認したりできます。

searchwp\query\results

4.0.0以降

SearchWPが見つけた結果を変更します。

パラメータ

タイプ パラメータ デフォルト 提供開始
配列 $results クエリの結果 4.0.0
\SearchWP\Query $query 実行中のクエリ 4.0.0

All hooks should be added to your custom SearchWP Customizations Plugin.

返される結果をカスタマイズする

<?php
// Customize the results returned by SearchWP.
add_filter( 'searchwp\query\results', function( $results, $query ) {
// This is where you can manipulate the $results array of results.
return $results;
}, 30, 2 );

このコードの使用方法