Taxonomies for custom post types

For question one, reading the following from the codex makes me think you need to change hierarchical to 1: depth (integer) (optional) The max depth. This is ignore unless hierarchical is set to true. Default: 0/False hierarchical (boolean) (optional) Display all categories (0/False) or display categories (1/True) to a depth of ‘depth’. Default: 0/False

Disabling wp_tag_cloud() outputting inline CSS

The only way to do this is to return the tag cloud as an array since every other tag parameter will still add inline font-sizing. To return the cloud as an array you can use <?php $tag = wp_tag_cloud(‘format=array’ );?> or in a functions.php filter, //tag cloud custom add_filter(‘widget_tag_cloud_args’,’style_tags’); function style_tags($args) { $tag = wp_tag_cloud(‘format=array’ … Read more

How to display custom taxonomies with links in filter menu?

<div id=”filtering-nav”> <a href=”#” class=”filter-btn”><span>Filter</span></a> <ul> <li><a href=”#all” class=”all”>All</a></li> <?php $args=array(‘orderby’ => ‘name’,’taxonomy’=>’galleries’); $galleries=get_categories($args); foreach($galleries as $gallery){ ?> <li><a href=”<?php echo get_category_link( $gallery->term_id ) ; ?>” class=”<?php echo $gallery->gallery_nicename; ?>”><?php echo $gallery->name; ?></a></li> <?php } ?> </ul> <div class=”clearfix”></div> When you pass argument to get_categories function , you need to pass name of taxonomy as … Read more

Extending AZIndex plugin to use custom post types and custom taxonomies

Plugin by default works with two deafult WordPress taxonomies ‘category’ and ‘post_tag ‘. As you already know WordPress has three built in taxonomies ‘category’, ‘post_tag’ and ‘link_category’. Further, plugin trace two WordPress post types ‘post’ (normal posts) and ‘page’. When you know this and that, you can easily modify plugin to index your_custom_taxonomy and your … Read more

How to have two different versions of a tag/category/taxonomy archive page?

My solution at the moment is to use a GET variable to request a different page template: Regular version of taxonomy page: mysite.com/subjects/science Blog version of taxonomy page: mysite.com/subjects/science?view=blog To handle the ?view=blog variable, I add this conditional to the top of taxonomy.php (or taxonomy-subjects.php and any other taxonomy-{slug} that I want to have an … Read more

custom types taxonomy hide_empty

Try setting ‘hierarchical’ to true if its not already. From source documentation: hierarchical – Whether to include terms that have non-empty descendants (even if ‘hide_empty’ is set to true). I think its usually set to trie by default, so I’m thinking you might have intentionally set it to fale for your purposes.

List taxonomy terms for post as checkboxes

Try this: $jobsTerms = get_terms(‘jobtype’,array( ‘taxonomy’ => ‘jobtype’ )); foreach($jobsTerms as $term){ $checked = (has_term($term->slug, ‘jobtype’, $post->ID)) ? ‘checked=”checked”‘ : ”; echo “<label for=”term-” . $term->slug . “”>” . $term->name . “</label>”; echo “<input type=”checkbox” name=”term” . $term->slug . “” value=”” . $term->name . “” $checked />”; } Replace $post_id with whatever you need to … Read more