Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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.

    nope – i assume those functions u mention return true or false if the post has a next or previous post. What we want is a function that returns true or false if the current page of posts has a previous or next page of posts.

    I tried the exact same ‘gee I hope this works!’ code. No go. I know what you mean – at the moment either the nav links are there when required or there is a big gap when there arent any other pages to navigate to. Need a function to ask wether there is a next or previous page to navigate to so the navigation space is only written when necessary.

Viewing 3 replies - 1 through 3 (of 3 total)