I made a special template for one of the pages in my theme. I know there's a new format for this in Twenty Eleven. One I'm still a bit confused about so I could use some assistance.
I created my theme and then did the following:
`<article>
<div class="entry-content">
<?php the_content(); ?>
</div><!-- .entry-content -->
</article><!-- #post-<?php the_ID(); ?> -->
Problem is my content isn't showing up.
Any idea why? I need to get this working and soon.
do you have any wordpress loop code in that template?
please post the full code of your template (please use the http://pastebin.com/ if the code is longer tha 10 lines)
No, I don't think I do. But then I noticed the new page template(s) for TwentyEleven don't seem to use the loop either. Anyway, Here's the PasteBin link.
possible way to add the loop:
http://pastebin.com/qtiZ9UDi
Yep, that worked! Thanks, Alchymyth. Out of curiosity, would that also apply for display comments? I'm trying to do something similar with a category archive where all the posts appear on the left and a comments form and list of comments on the right. Form appears but comments don't but I don't have a loop going on either.
you possibly need to put a loop around the comments part as well;
to get the posts/comments, you might need to add a rewind_posts(); before the while( have_posts() ) : line in that part.
http://codex.wordpress.org/Function_Reference/rewind_posts
Well, that didn't work. Comments still won't appear. I think it's because it's a unique situation where I'm trying to create a form and have the comments appear for all posts instead of for an individual post which comments normally appear for.
So I create a PasteBin for that as well. Here's that link:
http://pastebin.com/yT9RFjJP