For the pagination, you must include the ‘paged’ argument to the query:
<?php
$paged = (intval(get_query_var('paged'))) ? intval(get_query_var('paged')) : ((intval(get_query_var('page'))) ? intval(get_query_var('page')) : 1);
query_posts("posts_per_page=1&paged=$paged");
if ( have_posts() ) : ?>
Can’t spot why comments aren’t working.
I had seen that in another topic and tried my best, but could not, for the life of me, get it to work.
Thank you!
I figured it out. I started removing snippets and when I removed this
<?php query_posts('posts_per_page=1');
from the the single.php and page.php everything is now working.
So now it’s just:
<?php if ( have_posts() ) : ?>
(@lomatic)
12 years, 8 months ago
I’ve been working on making my own theme/templates and so far everything is looking fine. Looking is the key word.
I’ve been able to get all of the content where I want by tearing into the basic markup from wp.tutsplus.com and like I said it looks like what I want but…..
On the index page the page navigation isn’t working correctly. It will navigate forward and back and expected but the page content doesn’t actually change.
And then, following the instruction from the same site, I copied the same code from index.php to the single.php.
Here is the code from index.php:
I’m fully prepared and expecting there to be errors, the weird thing is that it all displays correctly except on the single.php where the comments.php file isn’t being pulled in…
Here’s that code:
Any help or insight would be great!
Here’s a screen cap