Hello.
I'm using WordPress 3.0.5. with a child theme of Twenty Ten (created by me) installed, it has not many modifications to the original. I created a template to display a history of my posts in a page. Everything seems to work correctly, but I dont know how to paginate it. I would love to show in 50 posts groups whith the pagination at the end. Any body could hel me?
I leave the code that I have prepared below.
http://wordpress.pastebin.com/WYskqsLw
Thank you very much.
Nasgor
[sig moderated as per the Forum Rules]
Why are you querying the database directly
<?php
$numposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_status = 'publish'");
if (0 < $numposts) $numposts = number_format($numposts);
?>
instead of using query_posts?
http://codex.wordpress.org/Function_Reference/query_posts
That was a code I found online and modified. That's why the code was with that format. But I've improved it. Even so, I still do not know how pageinate the results in the template. If anyone can help me or give me a hint I'd appreciate it very much.
Here is the code.
http://wordpress.pastebin.com/CjKsKhZw
Thank you very much.
Nasgor
[sig moderated as per the Forum Rules]
See the link I gave above.