I have seen many different parameters or arguments that can be passed to a query. For example, category_in, category_and term_id to name a few. Some of these can be found by using print_r to print out the object. ( If I have that right ). Others like the category__in I have been unable to find in codex. Is there a trick to learning about these parameters? How do I find them?
|
They're all in the codex page for |
|||
|
|
As a compliment to Milo's answer and WP_Query Codex entry above, here is a nice little cheat-sheet and reference which summarizes the WordPress Query Comprehensive Reference ...and here's a little gist to go along with it for debugging your query, Debugging WP_Query
PS. this is just a quick and dirty way to see whats going on. There are other tools, snippets and plugins that do this in a more organized fashion. But that's a discussion for another time. |
|||
|
|
|
All of those are in the Codex. http://codex.wordpress.org/Class_Reference/WP_Query I feel guilty about posting this as an answer but it does very directly answer your questions, "Is there a trick to learning about these parameters?" and "How do I find them?" The trick is to search the Codex, and to read the Codex. Follow the links in the Codex. Look in the source code, a link to which is provided in many, but not all, of the Codex entries. Yes, |
|||||||||
|
|
The code itself is also a great place to learn about all possible arguments. One advantage over all the other methods (including the Codexs) is that it never gets outdated. Here's the code for WP_Query: http://core.trac.wordpress.org/browser/trunk/wp-includes/query.php The arguments you are referring to are in its |
|||
|
|
