Good day, Mitcho!
First of all, thnx for your wonderful work.
Can i somehow get the related posts as array, returned from related_posts() arguments (or just given post' id)?
There's been question like mine earlier, but you answered via email.
Good day, Mitcho!
First of all, thnx for your wonderful work.
Can i somehow get the related posts as array, returned from related_posts() arguments (or just given post' id)?
There's been question like mine earlier, but you answered via email.
@Ahaenor - No, this is not currently possible in a direct manner, but you can do this by looping through the related posts in a YARPP template and then putting each posts' data into an array. I have an example like this in the example YARPP template file yarpp-template-list.php: https://svn.wp-plugins.org/yet-another-related-posts-plugin/trunk/yarpp-templates/yarpp-template-list.php
I hope that helps. :)
@Ahaenor - ps: I'm curious about what you'd like to use such an array for.
you can do this by looping through the related posts in a YARPP template and then putting each posts' data into an array. I have an example like this in the example YARPP template file yarpp-template-list.php: https://svn.wp-plugins.org/yet-another-related-posts-plugin/trunk/yarpp-templates/yarpp-template-list.php
Yes, thanks one more time, i've already came to this way and it's goes well. Exactly, i'm creating the posts' array in the template file, then json-encoding and echoing it.
I'm curious about what you'd like to use such an array for.
Well, in case of mine the need of all this stuff has been born from the object to get the latest news from RSS feeds and then automatically assign to them some "related" posts. But object is making agile and editable the link between topic and posts, related to it.
Alright, best of luck!
You must log in to post.