/* get_the_modified_time()の結果がget_the_time()より古い場合はget_the_time()を返す。 同じ場合はnullをかえす。 それ以外はget_the_modified_time()をかえす。 */ function get_mtime($format) { $mtime = get_the_modified_time('Ymd'); $ptime = get_the_time('Ymd'); if ($ptime > $mtime) { return get_the_time($format); } elseif ($ptime === $mtime) { return null; } else { return get_the_modified_time($format); } } これは、予約投稿により、更新日よりも公開日の方が先になってし
![記事の更新日をHTML5対応にして正しくGoogleに伝える方法[WordPressカスタマイズ]](https://cdn-ak-scissors.b.st-hatena.com/image/square/f3b9b33a7168c14749003143dd4d95c80bbd718e/height=288;version=1;width=512/https%3A%2F%2Fnelog.jp%2Fwp-content%2Fuploads%2F2014%2F06%2F93c6b9a6b131.jpg)