Current Issue details

Current Issue details

Buy Current Issue

March Issue details

March Issue details

January - February Issue details

January - February Issue details

December Issue details

December Issue details

Blogs > Picks and Pans (videos)

Published: 2012/02/16

Radiohead "House of Cards" at Bonnaroo

Here’s a look back at Radiohead’s Bonnaroo 2006 performance…

Comments

There is 1 comment associated with this post

Suvarna April 20, 2012, 21:44:03

Hi, it is term_link indeed. However, I cldoun’t make the link structure the way I like it.I am writing a plugin for my portfolio site and I wanted to migrate my portfolio to a custom post type (currently it is located in the built-in posts). Your solution helped me re-creating the structure for the portfolio post type, but it seems that for custom taxonomies wouldn’t be so easy (portfolio categories in my case). I just wanted to have a root taxonomy called projects and sub-categories in it. Sub-categories appear with /projects/category-slug/ as desired, but the root was appearing as /projects/projects/ which I don’t like and decided to remove the first project’ word. I wrote this:// Portfolio categoryregister_taxonomy( portfolio_category’, portfolio’,array( hierarchical’ => true, label’ => ?????????’, singular_label’ => ?????????’, public’ => true, query_var’ => portfolio_category’, rewrite’ => array( slug’ => projects/%portfolio_category%’,‘with_front’=>false), _builtin’ => false));// Add custom taxonomy link for Portfolioadd_filter( term_link’, portfolio_category_link’, 1, 3);function portfolio_category_link($link){if ( strpos($link,’portfolio_category‘) >= 0 ) {$slug = substr($link,strpos($link,’portfolio_category‘)+18,1);$term = get_term_by( slug’,$slug,‘portfolio_category’);if($term>parent>0){$link = str_replace( portfolio_category‘,‘projects’,$link);} else {$link = str_replace( portfolio_category/’, ,$link);}//return str_replace( category_parent‘,‘projects’,$link);}return $link;}Sub-categories work like a charm, but the root one returns error 404 :(I tried other hacks but without success. Finally I got it working, not the way I like but an acceptable one changing the root custom category slug from projects’ to all’. Now it appears as /projects/all/ almost good.If you find a way to have hierarchy in permalinks for custom taxonomies, please write :)

Note: It may take a moment for your post to appear

(required) (required, not public)