Skip to main content

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.