What does `WP_Query` do in WordPress?

WordPress Fundamental Medium

WordPress Fundamental — Medium

What does `WP_Query` do in WordPress?

Key points

  • `WP_Query` is not used to execute raw SQL queries against the WordPress database.
  • It does not query the WordPress REST API for post data.
  • `WP_Query` is specifically designed for retrieving posts, not user data from the wp_users table.

Ready to go further?

Related questions