[wp-hackers] something like a post_get_posts?

Josh joshua.sibelman at gmail.com
Fri Sep 6 21:04:58 UTC 2013


We make heavy use of Scribu's excellent Posts 2 Posts plugin. There's a very handy P2P method that operates on the wp_query object where you can have it find connected posts and add them to the wp_query->posts array. 

What I'm looking to do is have a function that runs this where appropriate based on post type, but since it operates on the wp_query object it doesn't seem I could use pre_get_posts. There's no post_get_posts, but is there another action I can hook into that might be workable?

loop_start seems like a good candidate but there's not much documentation about that one.

Thanks in advance,
Josh



More information about the wp-hackers mailing list