echoz
Forum Replies Created
-
Forum: Plugins
In reply to: [Plugin: Elevate Parent Category Template] Description of Child CategoryThere are currently no provisions to get the description of the child category. But you can kinda do it yourself.
Check out the
get_category_titlemethod. It should easy to write something similar but grabs the description.no issues with activating it for me. what version of PHP are you running on?
doesn’t support custom post types now
thought i’d detail more about this fix while its being processed by the wordpress servers.
wordpress changed the way they did things in 3.1 with regards to hunting for templates to load.
with this version, they looked into the $category object more specifically, 2 properties of it, slug and term_id respectively.
the fix now modifies these 2 properties if its a >= wordpress version of 3.1.
if i had more time, i’d try to figure out a more universal fix with regards to custom templates as well. other than that. this is it for now.
finally had time to take a look at the code. just pushed a fix. Should work now.
Hey guys, try replacing it epct_redirect with this and lemme know if it works
function epct_redirect() { global $wp_query, $wp_version; if (is_category()) { $childcat = $wp_query->query_vars['cat']; $parent = get_category_parent($childcat); $category = get_category($childcat); if ($parent != 0) { $wp_query->query_vars['cat_child'] = $childcat; // fix from marty@halfempty to deal with custom template. if (version_compare($wp_version, '3.1', '>=')) { //fix for WP 3.1 $parent = get_category($parent); $wp_query->queried_object->slug = $parent->slug; } else { $wp_query->query_vars['cat'] = $parent; } } } // print_r($wp_query->query_vars); }hi guys,
would really love to fix this but haven’t found the time beyond my other commitments. if anyone wants to take a crack at this, just let me know and i’d merge it to the trunk asap.
Your fix works for 3.1 alone? If that’s the case I’d just apply yours and put the min requirement as 3.1
pushed to svn.
thanks 🙂