It's a pretty simple question really! For some reason a title attribute is not appended to next_post_link and prev_post_link calls in Wordpress.
Anyone got any tips on this?
Thanks
|
It's a pretty simple question really! For some reason a Anyone got any tips on this? Thanks |
||||
UpdateAs I deleted the Repo on GitHub, here's a new answer.
|
|||||||||||||
|
|
I'm trying to do this right now as well. The filter function seems like the best bet. This is where I'm at now, but I can't seem to get the title of the next or previous post and pass it to the filter. Edit: Figured it out. A bit hackey probably, but it works.
|
||||
|
|
|
A bit old perhaps, and I wasn't really sure on how to make a comment on a reply... In short, after looking for the same solution I've modified Picard102's suggestion just a tiny bit:
|
|||
|
|
|
you could use this plugin: post link plus. Has many additional configuration options that can come in handy for post navigation. |
|||
|
|
|
|||
|
|
next_posts_link_attributes and previous_posts_link_attributes are the hooks. The return on the function adds that into the link's attributes... you can do almost anything you want with it. |
|||
|
|
|
No need for functions and filters all you need to do is to use
To get next post and it's title attribute use this
|
|||
|
|
next|previous_post_linkfilter. One way is to use regex. btw, paste your current prev/next code. – zeo Mar 25 '11 at 21:05