Hi,
I am making a wordpress website which I have made a category called "Shopping reviews", I also have child catgories to it called "Shopping Centers", "Markets" etc.
I have this code
PHP Code:
<li id="categories"><h2><?php _e('Posts by Category'); ?></h2>
<?php wp_dropdown_categories('show_option_none=Select category'); ?>
<script type="text/javascript"><!--
var dropdown = document.getElementById("cat");
function onCatChange() {
if ( dropdown.options[dropdown.selectedIndex].value > 0 ) {
location.href = "<?php echo get_option('home');
?>/?cat="+dropdown.options[dropdown.selectedIndex].value;
}
}
dropdown.onchange = onCatChange;
--></script>
</li>
This just shows all the categories, but I would like to show ONLY the child categories for that particular parent category.
Any Ideas?
^^Does that even make sense?
|