Add custom post types to the Loop by adding an action to `pre_get_posts`

[deprecated permalink=”http://uncommoncontent.com/2012/01/28/add-custom-post-types-to-the-loop”]

I wrote this function to allow me to use custom post types in my blog without having to fine-tune each template for their inclusion. It checks the query to see if `post_type` is set; if it is not set (as it would be on a specific post type’s archive page), it includes all public post types.

Continue reading Add custom post types to the Loop by adding an action to `pre_get_posts`