Posts use index.php instead of single.php
-
I’m building my own WordPress theme and I included a custom post type in this theme.
When visiting any type of post the index.php is being used as a template instead of the single.php file.I get the following error when looking at posts in my /wp-admin page: (/app/public/wp-content/themes/VanderVeer thema/single.php): failed to open stream: No such file or directory in /app/public/wp-includes/class-wp-theme.php on line 1018
A few solutions people on the internet adviced to do that haven’t worked yet:
Visiting/saving the permalinks page.
Restarting my server (I’m working on a local server)
Reinstalling WordPress and import the theme.All of these options didn’t work for me and I can’t find other solutions.
My archive.php is working and I have tried different single.php files so I don’t think the error is within these files of my theme.
- The topic ‘Posts use index.php instead of single.php’ is closed to new replies.