I have read a number of questions on SE regarding these but I still can't figure the exact difference wrt usage. Would it be true to say that I would probably use WP_Query for the majority of secondary loops and only use get_posts if I need the results returned in an array, or to put it another way is the main difference between the two the array vs object return, or is there some other major factor I should be aware of?
Tell me more
×
WordPress Answers is a question and answer site for
WordPress developers and administrators. It's 100% free, no registration required.
The difference between get_posts & WP_QueryYou can view
Normally (by default with Which to use...If you only need an array of posts, and don't need the query object -use |
|||
|
|