Created
November 3, 2020 12:30
-
-
Save yxod/eae52bdfeb10e605623065ce8735f06c to your computer and use it in GitHub Desktop.
Remove canonical from singular custom post types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function remove_canonical() { | |
if ( is_singular( 'voprosy' ) || is_singular( 'filialy') || is_singular( 'uslugi' ) ){ | |
add_filter( 'wpseo_canonical', '__return_false', 10, 1 ); | |
} | |
} | |
add_action('wp', 'remove_canonical'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment