Codex tools: Log in
Retrieves the object_id(s) belonging to a term in a taxonomy. Which Objects have the given term from the given taxonomy.
The strings of $taxonomies must exist before this function will continue. On failure of finding a valid taxonomy, it will return an WP_Error class, kind of like Exceptions in PHP 5, except you can't catch them. Even so, you can still test for the WP_Error class and get the error message.
The $terms aren't checked the same as $taxonomies, but still need to exist for $object_ids to be returned.
It is possible to change the order that object_ids is returned by either using PHP sort family functions or using the database by using $args with either ASC or DESC array. The value should be in the key named 'order'.
<?php get_objects_in_term( $term_ids, $taxonomies, $args ) ?>
NOTE: Arguments are passed in the format used by wp_parse_args(). e.g.
NOTE: If an object is in more than one of the terms passed to $terms, the results returned will contain duplicate object_ids
get_objects_in_term() is located in