Set custom post type and taxonomy terms with Ozh’ Tweet Archiver

I’m a sucker for custom post types, and also for archiving my tweets. [Ozh’ Tweet Archiver](http://planetozh.com/blog/my-projects/ozh-tweet-archiver-backup-twitter-with-wordpress/) hits the sweet spot between form and function; I added this filter to my `functions.php` so that I could keep tweets separate from posts without having to build a new blog.

Continue reading Set custom post type and taxonomy terms with Ozh’ Tweet Archiver

Add taxonomy columns to admin Edit pages

I’m currently using custom post types and taxonomies extensively on this site, so it is very important to me to be able to see how I have catalogued a post, as well as being able to single out specific post types with a given taxonomy term while editing. The ideal place for this to happen is in the Admin Edit page.

The following set of functions grabs a list of available taxonomies for a given `post_type` and automatically adds columns to the Edit pages. This updated version does not have column information that disappears after using the Quick Edit AJAX on the Edit page. In addition, I’ve updated the taxonomy term links to actually work as filters on taxonomy and term.

Continue reading Add taxonomy columns to admin Edit pages

List a post type object’s terms and taxonomies

The native WordPress functions [`wp_get_object_taxonomies`](http://codex.wordpress.org/Function_Reference/get_object_taxonomies), [`wp_get_object_terms`](http://codex.wordpress.org/Function_Reference/wp_get_object_terms), and [`get_the_term_list`](http://codex.wordpress.org/Function_Reference/get_the_term_list) can be used to create a generic function to list of all taxonomies and terms of any custom post type.

Continue reading List a post type object’s terms and taxonomies

Adding A Custom Taxonomy Terms Widget To WordPress

The WordPress Categories Widget currently only handles the `category` taxonomy. I’ve modified it to allow the user to select a taxonomy, and tied in the Tag Cloud Widget code to give the user the choice of display formats: list, dropdown, and cloud. Multiple instances are possible, providing the user with an easy method for displaying links to user-built taxonomy terms.

`preg_replace_callback()` is used to fix the JavaScript for the dropdown menu; instead of generating the default `?query_var=value` format, it uses `get_term_link()` to generate the term URL.

Continue reading Adding A Custom Taxonomy Terms Widget To WordPress