Less More -
Posts: 4306
-
Thank you received: 0
-
-
-
Less More -
Posts: 4306
-
Thank you received: 0
-
-
-
2 months 3 weeks ago #3907 by Elias Katsaniotis,MSc
That is that the latter returns an array of posts while the former returns posts one at a time with the_post() function. That means that get_posts() returns all posts at once as an array while WP_Query iterates through posts one at a time echoing out the relevant content of each post as it iterates.
- Q&A
- Index
- WordPress
- What is the difference between WP_Query and Get_post?
Time to create page: 0.066 seconds