Cho mình hỏi cách xóa tất cả sitemap thêm bởi bởi plugin seo yoast trong functions.php như thế nào vây? tại mình không muốn hiển thị sitemap mặc định của wordpress được thêm bởi Plugin SEO Yoast và các plugin khác mà chỉ muốn tự làm bằng tay thì làm như thế nào? Ví mặc định của web wordpress mình thấy có sitemap.xml, sitemap_index.xml,.. mình muốn nó xóa hết thì làm sao? cảm ơn
Bạn muốn xóa tất cả thì add code sau vào functions.php của themes bạn nhé: Mã: // xóa tất cả sitemap function sitemap_exclude_post_type( $value, $post_type ) { return true; } add_filter( 'wpseo_sitemap_exclude_post_type', 'sitemap_exclude_post_type', 10, 2 ); Ngoài ra muốn xóa sitemap chỉ định thì đọc bài sau: Mã: https://kb.yoast.com/kb/how-to-customize-the-sitemap-index/