WP_Term_Query::query( string|array $query )

Sets up the query for retrieving terms.


Description Description


Parameters Parameters

$query

(string|array) (Required) Array or URL query string of parameters.


Top ↑

Return Return

(array|int) List of terms, or number of terms when 'count' is passed as a query var.


Top ↑

Source Source

File: wp-includes/class-wp-term-query.php

	public function query( $query ) {
		$this->query_vars = wp_parse_args( $query );
		return $this->get_terms();
	}

Top ↑

Changelog Changelog

Changelog
Version Description
4.6.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.