Skip to main content
Share Your Experience: Take the 2024 Developer Survey

get_posts() is a function for creating multiple loops. It retrieves a list of latest posts or posts matching criteria.

It makes use of the WP_Query class to fetch posts.