Here’s the function declaration, from /wp-includes/template-functions-links.php:
next_post_link($format='%link »', $link='%title', $in_same_cat =false, $excluded_categories = '')
Do you need more?
Thread Starter
Anat
(@anat)
hey thanks skippy, i am facing a problem…
i have made my own theme and i am using
<?php previous_post_link('« %link') ?> but I am getting a MySQL error. however this very same tag is working fine in the default theme
and when i do this then i get a parse error
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php previous_post_link('« %link') ?>
What’s the parse error? What ‘s the MySQL error?
Thread Starter
Anat
(@anat)
WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘ORDER BY post_date ASC LIMIT 1’ at line 1]
SELECT ID,post_title FROM wp_posts WHERE post_date > ” AND post_date < ‘2005-06-25 00:00:09’ AND post_status = ‘publish’ AND ID != ORDER BY post_date ASC LIMIT 1
i cant get next and previous posts links to work in my own theme, works perfect in default theme
Can you post the relevant bits of your theme?
Thread Starter
Anat
(@anat)
ohhh
I put the next and previous posts tag in the loop and now everything is fine….. but this was not reqd prior to 1.5…
Thread Starter
Anat
(@anat)
thanks skippy…. i shall now head straight for the wiki and put this there so that nobody else faces this problem