I'm having very weird issues with my permalinks and template files on this site I'm building.
I've created several Custom Post Types. These all have archive pages in my template structure named archive-$posttype.php
I've also created custom page templates named page-$name.php
that's located in a folder named my-templates
.
Here's my issue. When using default permalink settings these pages all work perfectly, but when prettyfying the permalink to /%postname%/
or any other permalink setting but the default one, they stop working and default to the index template.
I know there's nothing wrong with my code for the CPT as they all have set archive
'rewrite' => array( 'slug' => 'publikasjoner', 'with_front' => false ),
'has_archive' => 'publikasjoner',
There must be something I'm missing somewhere, but I've never had this issue and I can't find any info on it elsewhere..
archive-$posttype.php
archive-$posttype.php