Is it possible to have a Theme with built-in physical page files?
-
05-11-2019 - |
Question
I am creating a theme and was thinking if it would be possible to create pages within my theme folder that would reflect the wordpress url + path.
So for example I could when accessing: http://mydomain.com/about
it would looks for about.php or about.html inside my theme folder?
I have obtained success doing this but handling the is_404
method and then rendering the page with get_template_part($pathname)
, however, every page will output the 404 response status which is not viable?
Is there any other way to accomplish that? I wish there was some kind of url aliases I could grant for my theme and could use it.
Thanks in advance
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange