Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

category name wp query

$query = new WP_Query( array( 'category_name' => 'staff' ) );

cat (int) – use category id.
category_name (string) – use category slug.
category__and (array) – use category id.
category__in (array) – use category id.
category__not_in (array) – use category id.
 
PREVIOUS NEXT
Tagged: #category #wp #query
ADD COMMENT
Topic
Name
2+7 =