I made a basic site based off the underscores (_s) theme with a CPT/taxonomy, Advanced Custom Fields plugin, and 3 page templates. A simple site. Nothing out of the ordinary.
For some strange reason, when "pretty" permalinks are enabled, all pages and pagination links redirect to the 404 template. When I remove the 404.php template, the index.php is displayed in defiance of WordPresses template hierarchy (I have page.php, etc)
- The site works correctly with "ugly" default permalinks
- This happens on both local MAMP and remote Cpanel hosting
- Ive re-generated the .htaccess file many, many times
- CPT name/slug is not conflicting with page url names / persists if I remove CPT
- Theme file/folder permissions are correct
- Switching to default 2024 theme causes permalinks to work correctly (ruling out server config)
- Issue persists with all plugins disabled and theme files stripped down to the very basics (ruling out plugins)
- WP/plugin versions are all up to date.
- Renaming theme did nothing
- No errors in logs
- Searched high and low on forums, tried everything I could possibly think of.
Ive been developing WordPress for well over a decade and havent ever run into this and it's making me loose my marbles!
...what in a theme would even be affecting permalinks?!
Any help greatly appreciated!