ok – got it working now:
I copied the two functions responsible for generating the links – next_posts_link and previous_posts_link and renamed them has_next_posts and has_previous_posts. Then replaced the bit where it echoes its output with –
return true
else return false
So now i can go –
if (has_next_posts || has_previous_posts) {
//put nav block in
}
I was confused a bit coz there is a function named ‘next_post_link’ and ‘next_posts_link’ and I was looking at the wrong one.
Thanks for the help viper and alphaoide.