I have this code snippet within my index.php to display all sub categories of the current category page:
<?php
if (is_category()) {$this_category = get_category($cat); }
if($this_category->category_parent)
$this_category = wp_list_categories('orderby=id&show_count=0&title_li=&use_desc_for_title=1&child_of='.$this_category->category_parent."&echo=0");
else
$this_category = wp_list_categories('orderby=id&depth=1&show_count=0&title_li=&use_desc_for_title=1&child_of='.$this_category->cat_ID."&echo=0");
if ($this_category) { ?>
<ul>
<?php echo $this_category; ?>
</ul>
However I also want to include a "Show All" link within the list which shows all the posts from the current category (and also adopts the active state when selected).
I have tried "show_option_all" in the args but this just takes me to all posts rather than all posts in the parent category. I have also tried to change the depth to 0 but this has no effect. I have been searching for a solution but couldn't find anything relating to this exact problem.