Remove page from Sitemap when are setted as noindex #1054

This commit is contained in:
Diego Najar 2019-06-21 10:27:26 +02:00
parent 0cfb161e53
commit 3cd7fa7720
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ class pluginSitemap extends Plugin {
try { try {
// Create the page object from the page key // Create the page object from the page key
$page = new Page($pageKey); $page = new Page($pageKey);
if (!$page->noindex() && !$page->noarchive()) { if (!$page->noindex()) {
$xml .= '<url>'; $xml .= '<url>';
$xml .= '<loc>'.$page->permalink().'</loc>'; $xml .= '<loc>'.$page->permalink().'</loc>';
$xml .= '<lastmod>'.$page->date(SITEMAP_DATE_FORMAT).'</lastmod>'; $xml .= '<lastmod>'.$page->date(SITEMAP_DATE_FORMAT).'</lastmod>';