Custom Post Types in Taxonomy Archives

About a dozen versions of this already exist by other authors on WordPress.org, but I decided to throw in the version I cooked up just for some experience working with WordPress plugin development and because I’d already written most of it before I bothered to search.

This one is as exciting as it sounds.  It allows you to choose which content types you want to include in your /tag and /category pages.   One thing that (I think) makes this version unique is that it also allows you to add ‘media’ in addition to all of your custom post types.

Share and Enjoy:
  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks

flattr this!

One thought on “Custom Post Types in Taxonomy Archives

  1. Hi,

    I used your plugin, thanks for your work! There is one problem with it, though. You are using “is_tag()” etc, which means that all the wp_queries on the page will get results with all the posts from the different content types.

    Maybe it is better to use the flags that are set in the wp_query object itself, such as $query->is_tag, $query->is_category, so your plugin is workingon a per query basis. I changed it, and now it is working like a charm.

Leave a Reply

Your email address will not be published. Required fields are marked *

Connect with Facebook

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>