Any way to bypass needing index.php, page.php, etc
Closed this issue · 2 comments
I'm using your package for a custom WP setup we have. What I want to do is eliminate all index.php, page.php, etc and have it automatically use views/index.blade.php etc. I have this setup and working now BUUUT it still requires a blank index.php/404.php/page.php, etc... because otherwise it returns the wrong template (always index). Any ideas on a way to get around this?
You will always need index.php alongside style.css (and functions.php, assuming you want to do anything useful). Unfortunately, that's a core limitation in WordPress.
Another limitation is that the template hierarchy doesn't let you specify patterns or alternative template folders for WordPress to scan. So to that extent, what you're hoping to do isn't possible without essentially writing your own router.
In Sage 9, we were able to work around a few of the limitations, but none that would get you to where you want to be, unfortunately.
Yeah. You can't do it without completely replacing the WordPress Theme Hierarchy. WordPress wouldn't recognize a theme where there is no index.php.