[wp-trac] [WordPress Trac] #10786: Implementation of %my_taxonomy% in permastructs is incomplete

WordPress Trac wp-trac at lists.automattic.com
Tue Sep 29 16:21:39 UTC 2009


#10786: Implementation of %my_taxonomy% in permastructs is incomplete
--------------------------+-------------------------------------------------
 Reporter:  johnbillion   |       Owner:  ryan                         
     Type:  defect (bug)  |      Status:  new                          
 Priority:  normal        |   Milestone:  2.9                          
Component:  Permalinks    |     Version:  2.9                          
 Severity:  minor         |    Keywords:  has-patch commit dev-feedback
--------------------------+-------------------------------------------------

Comment(by johnbillion):

 Replying to [comment:7 dd32]:
 > If the post/object does not have any attached terms in the tax, and
 there is no default term, the resulting link is /blahblah//blahblah/ (ie.
 its a blank string between those double slashes)

 The only way around this is to force taxonomies to include a default term,
 which works fine for categories but is undesirable for tag-like taxonomies
 (you wouldn't want a default tag on your posts for example).

 Not sure what to suggest here. One option would be to whack a dash in
 there if there is no term for that object (producing
 /blahblah/-/blahblah/) and then omit the taxonomy part from the query when
 fetching the object from the permalink? It's not ideal but this is a
 relative edge case anyway and would probably be fine for those who are
 choosing to use custom taxonomies in their permastruct.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10786#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list