category name wp query

Solutions on MaxInterview for category name wp query by the best coders in the world

showing results for - "category name wp query"
Emmanuelle
21 Aug 2018
1$query = new WP_Query( array( 'category_name' => 'staff' ) );
2
3cat (int) – use category id.
4category_name (string) – use category slug.
5category__and (array) – use category id.
6category__in (array) – use category id.
7category__not_in (array) – use category id.