PHP code for using custom post types with wordpress.

(See WP_Query)
http://codex.wordpress.org/Class_Reference/WP_Query#Usage
http://codex.wordpress.org/Class_Reference/WP_Query#Type_Parameters