WordPress.org

Support

Support » Themes and Templates » How to get next_post url?

How to get next_post url?

  • Is there any way to get the URL of the next post? next_post() will only return a complete a tag. This is quite annoying, perhaps I’m missing something obvious?

Viewing 5 replies - 1 through 5 (of 5 total)
  • I don’t know if there’s any already but you could always strip off the original wp function to suit your need and call that modified function.

    Now I’ve discovered that I have the same problem (the raw URL isn’t available) in many places. I like to style my a tags, and occassionally use JS with my URLs.
    Since the whole reason I stopped using bblog was to avoid writing a lot of my own code switching to WP doesn’t seem like such a good idea anymore.

    Difficult not to write one’s own code when one likes to do things a certain way.

    Depends how flexible the initial code is, I guess.

    It’s easy to modify the function. You probably only need to delete a few last lines and you’re done.
    Anyhow, WP 1.3 will provides two types functions: the ones that echo the output and the ones that return raw output.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to get next_post url?’ is closed to new replies.
Skip to toolbar