wp query – Wp_query to get woocomerce product categorys
Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.
Anybody can ask a question
Anybody can answer
The best answers are voted up and rise to the top
What am I doing wrong? I want to get all woocommerce product categories, but the query not working.
The names of the variables are a bit weird, so ignore that.
$case_study_args = array( 'post_type' => 'product_cat', 'posts_per_page' => '-1' ); $case_studies = new WP_Query( $case_study_args );
Leave an answer