Which file/template is in charge of taxonomies for custom post types?

There’s a giant diagram on the wordpress documentation showing how it chooses which file to display/load, as you can see here: http://codex.wordpress.org/images/1/18/Template_Hierarchy.png If this doesn’t help, my other suggestion is trying with the ‘_’ removed from the taxonomy name, and to test with the rewrite option removed from your custom post type declaration. In my … Read more

How can I merge this function(s) that inserts terms to a custom taxonomy with this other that adds a custom taxonomy filter?

So, you want this? (source: mikeschinkel.com) Alright, here ya go: <?php /* Plugin name: Static Content */ if (!class_exists(‘YourSite_StaticContent’)) { class YourSite_StaticContent { static function on_load() { add_action(‘init’,array(__CLASS__,’init’)); add_filter(‘manage_static_content_posts_columns’, array(__CLASS__,’manage_static_content_posts_columns’)); add_filter(‘manage_posts_custom_column’, array(__CLASS__,’manage_posts_custom_column’),10,2); add_action(‘restrict_manage_posts’, array(__CLASS__,’restrict_manage_posts’)); add_filter(‘parse_query’, array(__CLASS__,’parse_query’)); } static function init() { register_post_type(‘static_content’,array( ‘labels’ => array( ‘name’ => __( ‘Static Content’ ), ‘singular_name’ => __( ‘Static … Read more

Listing all slugs?

Hi @Wordpressor: Sounds pretty simple so I’m concerned I misunderstand, but in case I did understand correctly here’s a function; just pass the taxonomy to it like this: echo get_taxonomy_list_html(‘category’): function get_taxonomy_list_html($taxonomy) { $term_links = array(); foreach(get_terms($taxonomy) as $term) { if (!empty($term->slug) && $term->count>0) { $link = get_term_link($term,$taxonomy); $term_links[] = “[ <a href=”https://wordpress.stackexchange.com/questions/8326/{$link}”>{$term->name}</a> ({$term->count}) ]”; … Read more

Adding a second custom taxonomy to a custom post type (both shown in its table)?

I use the following in my filter hook manage_edit-<post-type>_columns add_filter( ‘manage_edit-visitor_columns’, array( &$this, ‘_wp_filter_visitor_columns’ ) ); public function _wp_filter_visitor_columns( $columns ) { $columns = array( ‘cb’ => ‘<input type=”checkbox” />’, ‘title’ => ‘Name’, ‘type’ => ‘Type’, //’state’ => ‘Current State’, ‘id’ => ‘Visitor ID’, ‘acct’ => ‘Using Account’, ); return $columns; } And to filter … Read more

Permalink Problems

Sorry guys, this is becoming a habit, but I found a solution, as follows: set rewrite to false in taxonomy registration: register_taxonomy(‘property_type’,array(‘sbproperty’), array( ‘hierarchical’ => true, ‘labels’ => $labels, ‘show_ui’ => true, ‘query_var’ => true, ‘rewrite’ => false )); And create my own rule add_filter(‘rewrite_rules_array’,’wp_insertMyRewriteRules’); add_filter(‘init’,’flushRules’); function flushRules(){ global $wp_rewrite; $wp_rewrite->flush_rules(); } function wp_insertMyRewriteRules($rules) { … Read more

Why doesnt this query work? (Custom Taxonomy)

you mixed the query with the register function, try this: function taxonomy_init() { // create a new taxonomy register_taxonomy( ‘country’, ‘post’, array( ‘label’ => __(‘Countries (Labels)’), ‘rewrite’ => array(‘slug’ => ‘location’) ) ); } add_action( ‘init’, ‘taxonomy_init’ ); the in your query use $my_query = array( ‘posts_per_page’ => 10, ‘tax_query’ => array( array( ‘taxonomy’ => … Read more