Pergunta

I've been looking for a list all WP_Query arguments.

This looks obvious, but http://codex.wordpress.org/Function_Reference/WP_Query isn't helpful at all, "post_type" is mentioned only in an example, and arguments like "posts_per_page" aren't even there.

Foi útil?

Solução

I believe this is what you're looking for.

(You're right to look for it on the class documentation...i think the reason why it's on query_posts() is because that (and get_posts()) is meant to be the primarily used function to get posts.)

Outras dicas

Hi @Wordpressor:

The arguments for WP_Query() are documented on the query_posts() page on the Codex:

And for WordPress 3.1 you can also find the most complete documentation for the WP_Query args on lines 1872 through 2705 of /wp-includes/query.php. :-)

-Mike

Licenciado em: CC-BY-SA com atribuição
Não afiliado a wordpress.stackexchange
scroll top