Hi,

I've tried everything to exclude taxonomy terms from my sitemap and nothing works. I am using Ubercart and the issue is that the taxonomy terms lead to empty pages, whereas, the aliased catalog pages contain the content. I don't want customers who search to land on an empty taxonomy page.

I disabled XML sitemap taxonomy, cleared cache, regenerated sitemap and that did not work. I excluded taxonomy and that did not work. These still show in my sitemap: taxonomy/term/36

Any help would be greatly appreciated!
Chris

Comments

seaneffel’s picture

Category: support » feature

It would be nice to exclude taxonomy terms from within a single vocabulary. Right now, one can only include the entire vocabulary term set - whether or not all the terms are relevant to the sitemap.

Of course, you can custom design your vocabularies to work around this - but categorizing content should come first, then function second.

I have heard people can cheat this module to list nodes only of certain taxonomy terms but tapping into the menu function. I have not experimented with this yet.

robmalon’s picture

It seems you can remove a link by implementing hook_xmlsitemap_link_alter, however to run an extra query for every link added to determine if it's valid seems impractical towards performance. I can generate a list of invalid taxonomy term ID's via a single query that should be excluded from a vocab of terms of which 98% should be included. Managing that query into a provided hook so it only runs once per entity type seems to be missing.

Is there a better way to deal with a scenario like this that's already built into a hook? I'm taking random stabs at the hooks mentioned at http://drupalcontrib.org/api/drupal/contributions!xmlsitemap!xmlsitemap...., but the documentation in many cases is lacking explanation for this need.

I'm sure I could manually manage this with existing settings on term edit pages, however I'd much rather maintain it in code since anomaly terms like this will continue to be generated in future content. Code, means one less thing to manually manage.

kristen pol’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Closing this because it's so old.