May 2017
Beginner to intermediate
536 pages
14h 25m
English
WordPress posts act as the main module in web application development as well as content management systems. Therefore, WordPress comes up with a separate class called WP_Query for interacting with posts and pages. You can find more details about the use of WP_Query at http://codex.wordpress.org/Class_Reference/WP_Query.
So far, we've looked at procedural database access functions using global objects. Web application developers are much more familiar with object-oriented coding. The WP_Query class is a good choice for such developers when querying the database. Let's see the default usage of WP_Query using the following code:
$args = array( 'post_type' => 'topics', 'meta_query' => array( array( 'status' => '', 'value' ...Read now
Unlock full access