dennisvanhouts
Forum Replies Created
-
I’ve made a script to assing the parent class manually, but it does not quit work yet. It looks for the active child and then replaces the class of the ul that it’s in.
<ul> <?php $categories = wp_list_categories($args); $category_array = preg_split('/\n/', $categories); $count = count($category_array); $i = 0; while ( $i < $count ) { if ( preg_match('/current-cat/i', $category_array[$i+1]) ) { echo preg_replace('/<ul class=(\'|")children(\'|")>/i', '<ul class="children current-cat-children">', $category_array[$i]) . "\n"; } else { echo $category_array[$i] . "\n"; } $i++; } ?> </ul>
It only works and adds the parent class when the first child is active and thus has the current-cat class assigned, not when any other child is selected.
Forum: Fixing WordPress
In reply to: Code to generate current-cat-parent?I have the same problem, any solutions?
Forum: Fixing WordPress
In reply to: List categories for custom post typeNo, sorry, I take it back. I was using the alpha release in which it didn’t work. It does work in the beta release. Thanks, this helps alot!
Forum: Fixing WordPress
In reply to: List categories for custom post typeYes, I’m using the 3.0 beta. Using your code it shows the taxonomies and subtaxonomies the way I want it, but the links it generates aren’t correct.
All the links point to the category page.
Like this:
https://test.com/blog/category/Links should be like this, e.g.:
https://test.com/blog/type/chair/Forum: Fixing WordPress
In reply to: List categories for custom post typeIt does work.
Only thing: now all the taxonomies are nicely listed, but because the taxonomy is hierarchical I want to show the subtaxonomies onder their parent.
When listing categories for posts, the child is listed under the parent automaticly, can this be also be done for taxonomies?
Forum: Requests and Feedback
In reply to: Any ways to have a calender feature on wordpress?Have a look at asymptomatic, he has a: coutdown/dates to remember plugin. >>>
Forum: Plugins
In reply to: WP-Smilies pluginSorry, not the wp-plugin afcours, but the wp-smilies plugin.