I see that there are hooks for manipulating WP_Query before it gets its posts (parse_query, pre_get_posts), but I can't seem to find any hooks for after the WP_Query object is populated. I have a custom table for my plugin-specific post-associated meta data that I would like to fetch from after a WP_Query object is populated.
Tell me more
×
WordPress Answers is a question and answer site for
WordPress developers and administrators. It's 100% free, no registration required.
|
As you haven't stated what you are trying to achieve and have just mentioned you need to fetch associated data. You have two options to query your custom table:
The example below demonstrates first method.
For the second method you will need to look at posts_where, posts_join, posts_groupby and posts_orderby filters. As an example you can have a look at the @scribu's sortable custom column's example. |
|||||||||||
|
|
Try with publish_post, save_post or wp_insert_post read more here |
|||
|