Created
December 14, 2015 15:07
-
-
Save diegoliv/71f0258f0519bf8bf5d0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<?php | |
function test_prevent_redirect( $redirect_url ) { | |
if ( is_single() && in_array( get_post_type( get_the_ID() ), array( 'cursos', 'videos', 'disciplinas' ) ) ) $redirect_url = false; | |
return $redirect_url; | |
} | |
add_filter('redirect_canonical', 'test_prevent_redirect' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment