Post Type rewrite rule to point to custom Page/template
I really don’t know why it’s doing this redirect, but i fixed this by changing the post_type&name $newrules[‘lessons/(.+)/home/?$’] = ‘index.php?post_type=page&name=lessonhome&home=yes’; to page_id: $newrules[‘lessons/(.+)/home/?$’] = ‘index.php?page_id=24&home=yes’; or to pagename: $newrules[‘lessons/(.+)/home/?$’] = ‘index.php?pagename=lessonhome&home=yes’; and it’s working fine!