[wp-hackers] How to display random post with next and previous links alphetically showed

Deepak Mittal dpac.mittal2 at gmail.com
Tue Jul 12 12:57:48 UTC 2011


Hi guys,

I am trying to display a random post on homepage using
 query_posts('orderby=rand')

The problem is I want to display the next and previos post links
alphabetically. That is to say, if I have posts with following titles:

Apple
Ball
Cat
Dog

And if Cat is chosen as random post, the next and previous link should show
Dog and Ball respectively. Any help for achieving this would be highly
appreciated.

-- 
Regards,
Deepak Mittal,
Twitter - @dpacmittal


More information about the wp-hackers mailing list