Title: Noindex Post Type
Last modified: April 13, 2017

---

# Noindex Post Type

 *  Resolved [Martin Blumenfeld](https://wordpress.org/support/users/monkeypress/)
 * (@monkeypress)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/noindex-post-type/)
 * How would I go about excluding a particular post type from the sitemap and also
   from being indexed by Google? I also want to exclude the SEO box. These are custom
   post types defined by a plugin so I can’t edit them.

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

 *  Plugin Author [Sybre Waaijer](https://wordpress.org/support/users/cybr/)
 * (@cybr)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/noindex-post-type/#post-9026230)
 * Hi [@monkeypress](https://wordpress.org/support/users/monkeypress/),
 * In the past two years TSF moved to supporting as much as possible automatically
   🙂
 * Now, to revert that process, I believe these filters should do the trick (untested!):
 *     ```
       //* This removes SEO metabox, SEO Bar and sitemap support.
       add_filter( 'the_seo_framework_supported_post_type', function( $post_type, $evaluated_post_type = '' ) {
   
       	if ( 'my_post_type' === $evaluated_post_type ) {
       		return false;
       	}
   
       	return $post_type;
       }, 10, 2 );
       ```
   
 *     ```
       //* This adds noindex on the post type pages
       add_filter( 'the_seo_framework_robots_meta_array', function( $meta = array() ) {
   
       	if ( 'my_post_type' === get_post_type() ) {
       		$meta['noindex'] = 'noindex';
       	}
   
       	return $meta;
       }, 10, 1 );
       ```
   
 * You can add that to your theme’s functions.php file or a custom plugin. Do not
   forget to change “my_post_type” to your post type name 🙂
    -  This reply was modified 9 years, 1 month ago by [Sybre Waaijer](https://wordpress.org/support/users/cybr/).
      Reason: Fixed code, had a fatal error
 *  Thread Starter [Martin Blumenfeld](https://wordpress.org/support/users/monkeypress/)
 * (@monkeypress)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/noindex-post-type/#post-9026248)
 * Thanks so much!
 *  Plugin Author [Sybre Waaijer](https://wordpress.org/support/users/cybr/)
 * (@cybr)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/noindex-post-type/#post-9026266)
 * [@monkeypress](https://wordpress.org/support/users/monkeypress/) No problem!
 * Note: the second code block had a missing `'` (thus fatal error), I just fixed
   that. 🙂

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

The topic ‘Noindex Post Type’ is closed to new replies.

 * ![](https://ps.w.org/autodescription/assets/icon.svg?rev=3000376)
 * [The SEO Framework – Fast, Automated, Effortless.](https://wordpress.org/plugins/autodescription/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autodescription/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autodescription/)
 * [Active Topics](https://wordpress.org/support/plugin/autodescription/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autodescription/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autodescription/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Sybre Waaijer](https://wordpress.org/support/users/cybr/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/noindex-post-type/#post-9026266)
 * Status: resolved