Add post classes for custom taxonomies to custom post type?

I found a snippet of code courtesy of mfields that solved this problem for me, here’s what I ended up using: <?php // Add custom taxonomies to the post class add_filter( ‘post_class’, ‘custom_taxonomy_post_class’, 10, 3 ); if( !function_exists( ‘custom_taxonomy_post_class’ ) ) { function custom_taxonomy_post_class( $classes, $class, $ID ) { $taxonomy = ‘listing-category’; $terms = get_the_terms( … Read more

Why is my working Custom Taxonomy not in get_taxonomies array?

The Invalid Taxonomy error will be raised by the function get_terms(). You’re registring your taxonomy on the init action hook. Therefore you have to call your get_terms() function on the same or a later hook. Try this snippet. It should display all term names of your taxonomy, regardless if the term is empty. add_action(‘init’, ‘wpse29164_registerTaxonomy’); … Read more

Hide the term description on the term edit page, for a given taxonomy

You could target the edit form for the post_tag taxonomy, through the post_tag_edit_form hook: /** * Hide the term description in the post_tag edit form */ add_action( “post_tag_edit_form”, function( $tag, $taxonomy ) { ?><style>.term-description-wrap{display:none;}</style><?php }, 10, 2 ); Here you can also target an individual tag. If you need something similar for other taxonomies, you … Read more

Using WordPress to make a “Product Search” type navigation drilldown

There’s a way to set custom post-type search. I can only head you in the right direction and answer the first part of your question. The other part about COOKIES you’ll have to review php documentation. Also, I don’t know exactly what the other $_REQUEST variables you may have set for your custom post type. … Read more

Creating Custom Taxonomy without mapping to any post type

It is possible to register a taxonomy without associating a post type by passing null as your argument for the $object_type. Unfortunately, this means that you will still need to associate an object type (post type) to your taxonomy later in order to use it. register_taxonomy( ‘aprwc_rating_criteria’, null, $args ); From the documentation: Setting explicitly … Read more

Is there a way to ‘Lock’ a Taxonomy?

Categories, Tags & Taxonomies First i want to make this one clear: Everything is a Taxonomy. Tags is a non-hierarchical, Categories a hierarchical and both are built-in taxonomies. Same goes for eg. post formats (aside, chat, etc.). It’s the same concept as with post-types (post, page, attachment, nav_menu_item, etc. are all just built in post … Read more