Monthly Archives: June 2010

Add custom post type and taxonomy counts in the Right Now Dashboard widget

WordPress 3.0 adds custom post types to the Dashboard’s main navigation sidebar, but I wanted a quick overview of my custom post types and taxonomies in the Right Now widget, just like it currently has for Posts, Pages, Categories, and Tags. I used WordPress’s internal dashboard code to create similar entries for custom post types and taxonomies.

Continue reading

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

[deprecated permalink=""]

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