Example site(mysite.com
) and page defined with wordpress as mysite.com/mypage
This page goes through template page-mypage.php
. Now when I run mysite.com/mypage/somechild
where somechild
page is not defined with wordpress. This causes Not found error(404).
How do I make mysite.com/mypage/*/*
go through template page-mypage.php
?
wordpress is not slug base templating, please check
https://developer.wordpress.org/files/2014/10/template-hierarchy.png
assuming you have a page called mypage, it will use if exists
and if you create another page called somechild assign as child page, the same method applies to this page.
You must select the same page template for child pages too. Make sure you have done that.