I\'m creating a custom Wordpress Theme and I can\'t seem to get the single.php template to work. Below is the code I have written. The title comes up but the content doesn\'t. A
the_content()
is not displaying because it has to be inside the The Loop - take a look at the docs here »
You need to change your code to this:
if ( have_posts() ) : while ( have_posts() ) : the_post();
the_content();
endwhile;
else:
endif;
You can leave out the else
if you are always sure you have content to display :) Or just take look at the original single.php
where you can find The Loop always surrounds the_content()
edit:
Here is the whole single.php you might wanna use/start with: