Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Disable canonical urls for pagination
- add_filter( 'redirect_canonical','custom_disable_redirect_canonical' );
- function custom_disable_redirect_canonical( $redirect_url ){
- global $post;
- $ptype = get_post_type( $post );
- if ( $ptype == 'collection' && is_archive() ) $redirect_url = false;
- return $redirect_url;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement