Custom Fields
Re-Envisioned
Support MB Relationships pre_get_posts to get all posts connected to single object Reply To: pre_get_posts to get all posts connected to single object

#11659

Anh Tran
Keymaster

Hi Juanita,

You’re right about the query var. And your idea of adding the query var is great. I think the only problem is using pre_get_posts is too late. The plugin uses parse_query hook to setup some parameter for the SQL. So you might want to change your code from pre_get_posts to parse_query.