get_posts()
returns an array, not a WP_Query
object. If you want to use have_posts()
and related functions, use a “raw” WP_Query
object.
get_posts()
returns an array, not a WP_Query
object. If you want to use have_posts()
and related functions, use a “raw” WP_Query
object.