Support

Account

Home Forums General Issues writing my wp_query using $wpdb class Reply To: writing my wp_query using $wpdb class

  • Is there a reason why you want to write it in the pure sql?

    but if you wanna know how that WP_Query translate to the sql, you can print out the request.

    
    $testimonials = new WP_Query( $args );
    echo $testimonials->request; // <- this is the sql statement
    

    Cheers