Multiple Canonicals
-
FYI I got notified of AMP errors today by Search Console (multiple canoncials). I found out that YOAST was adding in second canonical. This code fixes it:
// remove yoast canonical for web stories function remove_canonical() { if ( is_singular( 'web-story' ) ) { add_filter( 'wpseo_canonical', '__return_false' ); } } add_action('wp', 'remove_canonical');
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Multiple Canonicals’ is closed to new replies.