Changes between Version 2 and Version 3 of Ticket #14490, comment 3
- Timestamp:
- 03/10/2011 09:42:32 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #14490, comment 3
v2 v3 5 5 More details: 6 6 I tried to change the category name to use a tick mark, ' , instead, but the saved value was always considered a smart fancy quote ’. Seems like the problem stems from the category, not get_cat_id(). Both should be modified to handle fancy quotes. 7 8 ---- 9 10 I just realized that single_cat_title() should only be used for displaying the current category on a page. That's probably where the fancy quotes come from. I've seen this function being used to retrieve the name of the category page, which is then used to retrieve the category id. The better process is to do the following: 11 12 {{{ 13 global $wp_query; 14 if(is_category() || is_single()){ 15 $cid = get_query_var('cat'); 16 } 17 }}} 18 19 Or you could get the category slug from the url and work that way. Neither seems ideal unless I'm missing something.