WP_Query::query( string|array $query )

Sets up the WordPress query by parsing query string.


Description Description


Parameters Parameters

$query

(string|array) (Required) URL query string or array of query arguments.


Top ↑

Return Return

(array) List of posts.


Top ↑

Source Source

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

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

Top ↑

Changelog Changelog

Changelog
Version Description
1.5.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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