Canonicalization + Custom Post Types not working as expected
Think ive solved it and can’t believe what it was! On my rewrite rule I had: add_rewrite_rule( ‘custom-post-type/([0-9]+)/([^/]*)/?$’, ‘index.php?post_type=customposttype&p=$matches[1]’, ‘top’ ); Adding in and passing the post_name for the custom post type got it to start redirecting. add_rewrite_rule( ‘custom-post-type/([0-9]+)/([^/]*)/?$’, ‘index.php?post_type=customposttype&p=$matches[1]&customposttype=$matches[2]’, ‘top’ ); Anycase for now its late and it seems to have started working 🙂 … Read more