Tag: database queries
Getting to Know WP_Query
The WP_Query class is an exceptionally powerful tool in WordPress. As you may know, every WordPress site contains a database that stores many posts (of many post types) that make up the bulk of that site’s content, and WP_Query is the best way to fetch or retrieve a given selection of those posts for processing. So your theme files use it on regular basis, and a lot of plugins on your WordPress site will it.
How to Write a WP_Query for Multiple Specific Post IDs
Recently, a client project I’m working on required something I don’t think I’ve done before: write a WP_Query to fetch a dynamically generated list of post IDs.