
WordPressのサイト内検索は、デフォルトのままだとカスタムタクソノミーの値が検索対象に含まれません。
この検索機能を拡張する便利なプラグインが[Search Everything]ですが、残念なことに、新規投稿の公開時にエラーが発生するバグが残っており、しかも製作者様も放置しているという事態になっています。
出力されるエラー警告はおおむね次のとおり。
Fatal error: Cannot use object of type WP_Error as array in /home/example.com/public_html/wordpress/wp-content/plugins/search-everything/search-everything.php on line 927
どうやらWordPress本体のバージョンとの兼ね合いで起こるエラーのようですが、次の方法で解決できます。
Search Everything(Version: 8.1.9)のエラーの解決方法
プラグイン[Search Everything]の本体ファイル、『search-everything.php』内の913行目以下を、下記のコードで上書きします。
function se_post_publish_ping($post_id) {
    $status = false;
    if( ( $_POST['post_status'] == 'publish' ) && ( $_POST['original_post_status'] != 'publish' ) ) {
        $permalink = get_permalink($post_id);
        $zemanta_response = se_api(array(
            'method' => 'zemanta.post_published_ping',
            'current_url' => $permalink,
            'post_url' => $permalink,
            'post_rid' => '',
            'interface' => 'wordpress-se',
            'deployment' => 'search-everything',
            'format' => 'json'
        ));
        if (!is_wp_error($zemanta_response)) {
            $status = json_decode($zemanta_response['body'])->status;
        }
    }
    return $status;
}
add_action('publish_post', 'se_post_publish_ping');
実際に置換するのは、916行目のif( ( $_POST['post_status'] == 'publish' ) && ( $_POST['original_post_status'] != 'publish' ) ) {と、最末尾、935行目のadd_action('publish_post', 'se_post_publish_ping');の箇所になりますね。
この2カ所を書き換えると正常に動作するはずです。
お困りの方はぜひお役立てください。
Search Everything : https://wordpress.org/plugins/search-everything/
 
						 
								![【WordPress】日付を表示する[the_date();]と[the_time();]の挙動の違いについて。:サムネイル](https://on-ze.com/blog/wordpress/wp-content/themes/onze-blog-2024/inc/thumbnail/600x360x80-ea4dc0f91697fef53f35d4075df8f52b-wordpress-logo.png) 
								![WordPressプラグイン[Attendance Manager]を使っていたときに起きた不具合を解決。:サムネイル](https://on-ze.com/blog/wordpress/wp-content/themes/onze-blog-2024/inc/thumbnail/600x360x80-1d5c55867d4652af8ec28606a5e3a03b-screenshot-1.png) 
								 
							 
							![【Font】日本人ならゲシュタルト崩壊必至のフォント[Electroharmonix]が話題になっています。:サムネイル](https://on-ze.com/blog/wordpress/wp-content/themes/onze-blog-2024/inc/thumbnail/600x360x80-b9d8188b8fbabe8adf79fbdd200c9586-electroharmonix-a.png)