WordPress で post_class から hentry を削除する方法を紹介します。 例えば、Google Search Console の構造化データで hentry がきっかけのエラーが出た時に便利な方法です。 post_class から hentry を削除する方法 post_class から hentry を削除する方法 post_class から hentry を削除するためには、 次のコードを function.php に追加します。 /* 【出力カスタマイズ】post_class(); から hentry を削除する */ function remove_hentry( $classes ) { $classes = array_diff($classes, array('hentry')); return $classes; } add_filter('post_
![WordPress で post_class から hentry を削除する方法 - by Takumi Hirashima](https://cdn-ak-scissors.b.st-hatena.com/image/square/ec33fe1b627738319ad202ae8e3a2ed446286914/height=288;version=1;width=512/https%3A%2F%2Fhirashimatakumi.com%2Fwp%2Fwp-content%2Fthemes%2Ftakumihirashima%2Fimg%2Fogp.png)