Title: Feature request
Last modified: August 21, 2016

---

# Feature request

 *  Resolved [solosails](https://wordpress.org/support/users/solosails/)
 * (@solosails)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/feature-request-231/)
 * Hi,
 * I noticed when doing a site:www.mywebsite.com search in Google, that Google was
   indexing my AIOSEOP XML sitemap, is there a way to add a noindex option for the
   sitemap?
 * Also, I have Variations selected to noindex, but my Woocommerce variation taxonomies
   are still being indexed and don’t have the noindex meta on the page? Any chance
   we could get this added? Or, Any idea how I can do it manually?
 * Many thanks, Andrew
 * [https://wordpress.org/plugins/all-in-one-seo-pack/](https://wordpress.org/plugins/all-in-one-seo-pack/)

Viewing 15 replies - 1 through 15 (of 15 total)

 *  Thread Starter [solosails](https://wordpress.org/support/users/solosails/)
 * (@solosails)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/feature-request-231/#post-5115945)
 * On my second part of the Question, I think I should be asking about attributes
   as well as variations.
 * An example, I have an attribute on my e-commerce store called ‘Size’ and then
   various variations such as Large Xl etc.
 * If I type www. solosails. com/size/large I get a fairly useless list of items
   that use the Large attribute and it is these that I would like to add noindex,
   follow to, or specifically anything that has an attribute assigned.
 * Hope that makes sense!?
 * Thanks, Andrew
 *  [Peter Baylies](https://wordpress.org/support/users/pbaylies/)
 * (@pbaylies)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/feature-request-231/#post-5116036)
 * Hi Andrew,
 * It’s not possible to noindex a sitemap; you could add it to robots.txt but then
   that would negate the purpost of having a sitemap in the first place.
 * I’ll test against WooCommerce and see if I can reproduce your second issue; it’s
   also possible to customize what gets noindex meta further by using the aioseop_robots_meta
   hook.
 *  Thread Starter [solosails](https://wordpress.org/support/users/solosails/)
 * (@solosails)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/feature-request-231/#post-5116044)
 * Hi Peter,
 * Thank you for your response.
 * I wondered what the loop type effect of adding a noindex to Sitemap might cause.
 * Very surprising Google index them, would have thought it a very obvious thing
   not to index, but there you go!
 * RE Variations/Attributes, If you can reproduce this and have a soloution that
   would be great.
 * What is the meta hook? A plugin?
 * Many thanks, Andrew
 *  [Peter Baylies](https://wordpress.org/support/users/pbaylies/)
 * (@pbaylies)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/feature-request-231/#post-5116045)
 * Hi Andrew,
 * The hook is actually what the WordPress Plugin API uses to keep track of when
   it runs custom blocks of code from plugins; in short, after I look into this,
   if I can figure out what you want to do with tags in WooCommerce, I’ll probably
   end up giving you a block of code that runs on a hook that solves all your problems.
   🙂
 *  Thread Starter [solosails](https://wordpress.org/support/users/solosails/)
 * (@solosails)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/feature-request-231/#post-5116047)
 * Sounds Ideal! Thanks.
 * I use a hook modifier for some of my Themes functions, to pull in titles and 
   descriptions etc in Categories etc, but wondered if there was a specific AIOSEOP
   Hook plugin.
 * PS, its not the product tags or categories I have an issue with, I have dealt
   with that already using…
 *     ```
       /**
        * Adds a noindex, nofollow meta tag to product category pages.
        */
       add_action( 'wp_head', 'mycode_add_noindex_to_product_category_pages' );
       function mycode_add_noindex_to_product_category_pages() {
       	if ( is_product_category() ) {
       		echo '<meta name="robots" content="noindex,follow">';
       	}
       }
       ```
   
 * Thanks, Andrew
 *  [Peter Baylies](https://wordpress.org/support/users/pbaylies/)
 * (@pbaylies)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/feature-request-231/#post-5116071)
 * Hi Andrew,
 * I’ve looked into this, and the answer is, that while this is not supported yet,
   it should be soon. This depends on being able to manage content by custom taxonomies,
   which is a feature that is currently in the Pro version of the plugin, and should
   make it into the next major release of the Free version of the plugin. In the
   meantime, here’s that bit of code, add this to a plugin or to your functions.
   php in your theme:
 *     ```
       add_filter( 'aioseop_robots_meta', 'solosails_noindex_size_taxonomy' );
       function solosails_noindex_size_taxonomy( $robots ) {
           if ( is_tax( 'pa_size' ) ) $robots = 'noindex,follow';
           return $robots;
       }
       ```
   
 *  Thread Starter [solosails](https://wordpress.org/support/users/solosails/)
 * (@solosails)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/feature-request-231/#post-5116072)
 * Hi Peter, as always, you guys blow me away with your level of support.
 * Thank you.
 * Without being rude, is there anyway to target all taxonomies/attributes rather
   than individual ones?
 * Thanks again, Andrew
 *  [Peter Baylies](https://wordpress.org/support/users/pbaylies/)
 * (@pbaylies)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/feature-request-231/#post-5116073)
 * Hi Andrew,
 * You can target all custom taxonomy archive pages by using [is_tax()](http://codex.wordpress.org/Function_Reference/is_tax)
   instead of is_tax( ‘pa_size’ ) – you can target a specific list by using is_tax()
   with an Array, like so: is_tax( Array( ‘pa_size’, ‘pa_width’, ‘pa_height’ ) )
 *  Thread Starter [solosails](https://wordpress.org/support/users/solosails/)
 * (@solosails)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/feature-request-231/#post-5116075)
 * Fantastic Peter, thank you, beyond the call of duty.
 * Can I ask what the variations option in AIOSEOP noindex settings affects?
 * Thanks, Andrew
 *  Thread Starter [solosails](https://wordpress.org/support/users/solosails/)
 * (@solosails)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/feature-request-231/#post-5116077)
 * OK, I’m really pushing my luck now,,,
 * I have just taken my bit of code that I pasted before your reply and deleted 
   it and stuck the relevant bit into your code like so …
 *     ```
       // Add noindex to product attributes/variations
       add_filter( 'aioseop_robots_meta', 'solosails_noindex_size_taxonomy' );
       function solosails_noindex_size_taxonomy( $robots ) {
           if ( is_tax( 'pa_size' ) OR is_product_category() ) $robots = 'noindex,follow';
           return $robots;
       }
       ```
   
 * Does that look right to you?
 * Thanks, Andrew
 *  [Peter Baylies](https://wordpress.org/support/users/pbaylies/)
 * (@pbaylies)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/feature-request-231/#post-5116081)
 * Hi Andrew,
 * I gather that Variations is referring to a post type named Variations on your
   site. I think that code will work, although in practice I never use [OR](http://php.net/manual/en/language.operators.precedence.php)
   in PHP; in this case it should be fine, though.
 *  Thread Starter [solosails](https://wordpress.org/support/users/solosails/)
 * (@solosails)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/feature-request-231/#post-5116086)
 * Hi Peter,
 * Thanks very very much.
 * I guess the variations setting is to do with woocommerce, but it appears not 
   to do anything, which is why I was asking about it here.
 * The code seems to be working with no issues, so hopefully it should do the trick
   for now until the next update.
 * Thanks again, Andrew.
 *  Thread Starter [solosails](https://wordpress.org/support/users/solosails/)
 * (@solosails)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/feature-request-231/#post-5116089)
 * Ah, I am learning slowly …
 * In PHP use || instead of OR
 * Thanks, Andrew
 *  [Peter Baylies](https://wordpress.org/support/users/pbaylies/)
 * (@pbaylies)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/feature-request-231/#post-5116100)
 * OR is also fine in this case; I use || out of habit, the two have different operator
   precedences, which mainly relates back to how paranoid you end up getting with
   use of parentheses in your logic. 🙂
 *  Thread Starter [solosails](https://wordpress.org/support/users/solosails/)
 * (@solosails)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/feature-request-231/#post-5116105)
 * I’ll take your word for it on that matter!
 * Cheers.

Viewing 15 replies - 1 through 15 (of 15 total)

The topic ‘Feature request’ is closed to new replies.

 * ![](https://ps.w.org/all-in-one-seo-pack/assets/icon.svg?rev=2443290)
 * [All in One SEO – Powerful SEO Plugin to Boost SEO Rankings & Increase Traffic](https://wordpress.org/plugins/all-in-one-seo-pack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/all-in-one-seo-pack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/all-in-one-seo-pack/)
 * [Active Topics](https://wordpress.org/support/plugin/all-in-one-seo-pack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/all-in-one-seo-pack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/all-in-one-seo-pack/reviews/)

## Tags

 * [noindex](https://wordpress.org/support/topic-tag/noindex/)
 * [sitemap](https://wordpress.org/support/topic-tag/sitemap/)

 * 15 replies
 * 2 participants
 * Last reply from: [solosails](https://wordpress.org/support/users/solosails/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/feature-request-231/#post-5116105)
 * Status: resolved