WordPress.org

Ready to get started?Download WordPress

Forums

How to get next_post url? (6 posts)

  1. nheagy
    Member
    Posted 9 years ago #

    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?

  2. Joshua Sigar
    Member
    Posted 9 years ago #

    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.

  3. nheagy
    Member
    Posted 9 years ago #

    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.

  4. Beel
    Member
    Posted 9 years ago #

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

  5. nheagy
    Member
    Posted 9 years ago #

    Depends how flexible the initial code is, I guess.

  6. Joshua Sigar
    Member
    Posted 9 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.