How to optimize my query filtering out unwanted data?
get_posts() uses the WP_Query class to fetch posts. Usually, it returns an array of post objects. The $fields parameter for WP_Query accepts two valid arguments: ‘ids’ will make it return an array of post IDs and ‘id=>parent’ will make it return an associative array with the post objects properties as key => value pairs. Any … Read more