I have a 2 level menu but for my uniform there’s a problem to remove 1 URL from the sitemap.
Link: URL.com - MediaOptions
I have an Ajax Uniform. I have a folder URL.com - MediaOptionssend
Problem here, this URL is included in my sitemap.
When I put it in the ignore array, it do nothing.
How can I remove this URL?
<?php
$ignore = array('sitemap', 'error', 'maintenance', 'send');
// Send the right header
header('Content-type: text/xml; charset="utf-8"');
// Echo the doctype
echo '<?xml version="1.0" encoding="utf-8"?>';
?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<?php foreach($pages->index() as $p): ?>
<?php if(in_array($p->uri(), $ignore)) continue ?>
<url>
<loc><?php echo html($p->url()) ?></loc>
<lastmod><?php echo $p->modified('c') ?></lastmod>
<priority><?php echo ($p->isHomePage()) ? 1 : number_format(0.5/$p->depth(), 1) ?></priority>
</url>
<?php endforeach ?>
</urlset>