3

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!

25
  • Disable all plugins and then try again. Commented Feb 23, 2014 at 19:29
  • There are no plugins enabled. Commented Feb 23, 2014 at 19:31
  • Start debugging WP then. Follow its internal include chain and track where it breaks. This should not happen! See this codex.wordpress.org/Template_Hierarchy Commented Feb 23, 2014 at 19:34
  • 1
    Setup a new WP folder, a new Vhost or Site in your Web Server, download WP, setup the theme again and see how it works out. What you describe here is impossible hence cannot be solved remotely. Commented Feb 23, 2014 at 20:10
  • 1
    @JohannesN could you upload theme.zip file to let us check it. Commented Feb 23, 2014 at 23:17

2 Answers 2

2

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.

Sign up to request clarification or add additional context in comments.

Comments

0

I know it's crazy but from my experience What helped me was a simple change back to Standard Permalinks in "Settings" -> "Permalinks" and a restore back to "Name of the Post" (Beitragsname)....

...maybe this might help someone else as well...

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.