自带sitemap功能详解如何加上最后更新时间? 由 清白之年发表于 2021-04-29 默认sitemap xml里面只有地址,并没有更新时间: 只有地址 如何加入时间?在functions.php中加入: add_filter( 'wp_sitemaps_posts_entry', function( $entry, $post ) { $entry['lastmod'] = $post->post_modified_gmt; return $entry; }, 10, 2 ); 带有时间 赞赏