Overview This article demonstrates how to retrieve an array of post objects from the database using native WordPress functions. There are many ways to query posts in WordPress, however, this article will make use of the common get_posts function, WP_Query object and pre_get_posts filter. Getting Started You can skip this section if you’re already familiar with the above function, object, and filte
