query_posts( array|string $query )

Sets up The Loop with query parameters.

25 related functions found for: query_posts

Top ↑

Related terms found for this post

wp-parser-related-wordspost, posts, queri, query, query-php, wp-includes
wp-parser-packageQuery, WordPress

Top ↑

Terms Used Terms Used

Terms used in the related posts query

  • post
  • posts
  • queri
  • query
  • Query
  • query-php
  • wp-includes
  • wp-includes/query.php

Top ↑

Description Description

Note: This function will completely override the main query and isn’t intended for use by plugins or themes. Its overly-simplistic approach to modifying the main query can be problematic and should be avoided wherever possible. In most cases, there are better, more performant options for modifying the main query such as via the ‘pre_get_posts’ action within WP_Query.

This must not be used within the WordPress Loop.

Top ↑

Parameters Parameters


(array|string) (Required) Array or string of WP_Query arguments.

Top ↑

Return Return

(array) List of post objects.

Top ↑

Source Source

File: wp-includes/query.php


Top ↑

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.