Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wordpress is using index.php instead of single.php for posts

Tags:

php

wordpress

I am creating a Worpdress Theme and want to show my posts. I created single.php but when I open the post it displays it in index.php. Since single.php is higher in the hirarchy than index.php this should not happen.

For single.php I tried a very simple version like

<?php get_header(); ?>
Showing single.php
<?php get_footer(); ?>

and to be sure to have no erros I also tried to copy the single.php from twentytwelve. With both versions I have the same problem.

Can anyone help? Thanks!

like image 748
almo Avatar asked Feb 24 '26 01:02

almo


1 Answers

I know this sounds funny, but resave your permalinks in your Wordpress dashboard. If that doesn't work, I would try deleting and recreating single.php.

like image 140
Ashley Lbs. Avatar answered Feb 26 '26 15:02

Ashley Lbs.



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!