プラグインやテーマ開発でよく使うフィルタ・アクションを紹介したいと思います。 記事編集系 the_content 記事の本文をいじるときに使用します。 add_filter('the_content', function($content) { return $content . "<br>Hello World!"; }); 上の例では全ての記事の末尾に「Hello World!」が表示されます。 「preg_replace」や「str_replace」で特定の文字列やHTMLタグを置き換えたりできます。 会員以外は記事の最初だけを表示することも、このフィルタをフックすることで可能になります。 検索系 pre_get_posts 検索条件を細かく指定することができます。 メタ情報を使用した独自の絞り込みを行うこともできます。 add_action('pre_get_posts', fun