title: How to remove rel=canonical from tag pages in WordPress
body: <p>I have a website built with WordPress and I want to noindex my tag pages but I've noticed that, although I've marked them as noindex, Yoast SEO plugin still adds rel=canonical tag.</p>
  
  <p>Google says rel=canonical and noindex directives must not be together. So, I tried to remove canonical tag adding the following code to my functions.php file:</p>
  
  <pre><code>if ( is_tag() ) {
     add_filter( 'wpseo_canonical', '__return_false' );
     remove_action('wp_head', 'rel_canonical');
  }
  </code></pre>
  
  <p>But nothing happened. The canonical tag is still there.</p>
  
  <p>Do you know how I can remove it?</p>