Custom columns for taxonomy list table

The manage_{TAXONOMY}_custom_column filter hook passes 3 arguments: $content $column_name $term_id So try this: function add_book_place_column_content($content,$column_name,$term_id){ $term= get_term($term_id, ‘book_place’); switch ($column_name) { case ‘foo’: //do your stuff here with $term or $term_id $content=”test”; break; default: break; } return $content; } add_filter(‘manage_book_place_custom_column’, ‘add_book_place_column_content’,10,3);

Get Posts by Custom Post Type ,Taxonomy, and Term

This is the answer to the question 🙂 <?php $args = array( ‘post_type’=> ‘services’, ‘areas’ => ‘painting’, ‘order’ => ‘ASC’ ); $the_query = new WP_Query( $args ); if($the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); // content goes here endwhile; wp_reset_postdata(); else: endif; ?>

Saving Taxonomy Terms

I figured I would post the answer to this after Dimas was able to assist me. Utilizing his WPAlchemey Class I added a save_action var which looked like this (note that I am using the taxonomy for “category” which of course you can change to whatever your custom taxonomy might be): ‘save_action’ => ‘save_taxonomy_terms’, I … Read more

How to get taxonomy term of the current page and populate queries in the template

Hm, if you registered a taxonomy for the “page” object type correctly and then assigned a term of that taxonomy to a page… I believe you can then access the taxonomy and term slugs in the following way: get_query_var( ‘taxonomy’ ) get_query_var( ‘term’ ) If you print_r($wp_query) you will see all the parameters that are … Read more

get_terms by custom post type

I’m afraid this isn’t possible natively (yet?). See this trac: http://core.trac.wordpress.org/ticket/18106 Similarly on the taxonomy admin page the post count reflects all post types. (I’m pretty sure there is a trac ticket for that too) http://core.trac.wordpress.org/ticket/14084 See also, this related post. New solution Having written the one below, I’ve released a much better way (alteast … Read more