Which custom query am I in and how can I access its properties & methods?
First, don’t use is_main_query() function (method is ok). It tells something absolutely different from what you would think it does — was the main query overridden. As far as I remember, there is no clean solution to this since WP doesn’t have a concept of explicitly passing context to a specific template or template part. … Read more