• I want to create a dropdown menu where my readers can easily choose posts by Brands, reviews etc.

    I used this one, but i dont’ want all categories to show up. Only the childs of Brands (in this case the category are named “varumarken”).

    ?? I’m glad if someone can help me!

    <li id="categories"><h2><?php _e('S?k via Varum?rke'); ?></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>
Viewing 1 replies (of 1 total)
  • Thread Starter caroline

    (@makeupedia)

    I sorted it out myself! But what if i want to create a dropdown menu that shows posts from specific tags?

Viewing 1 replies (of 1 total)
  • The topic ‘Create a simple Dropdown (specific category)’ is closed to new replies.