I need array only all author ids from the loop, each one only once if possible and out of all posts in the loop. Any suggestions?
Assuming that you have an array of post objects in
What you will get are the post authors for the current page of posts, not the post authors for all of the posts. If you want the authors for all of the posts you will have run another query.
To run a new query based on the main query in
I caution you against this. You could be querying hundreds or thousands of posts. That could be very inefficient or even cause server failures, depending on the server and the load. I am almost certain that there is a better way to do this if you think it through and alter your architecture.
|show 1 more comment|
Normally there's the