• Resolved maloxx

    (@maloxx)


    I’ve added the line
    <?php wp_dropdown_categories(‘exclude=1,3&orderby=name&hierarchical=1’); ?>
    into the index.php of my theme but if I select a category nothing happens and the category site isn’t loaded.

    Does anybody has an idea about it?
    The site is: https://www.zwarwald.de

    Thanks in advance

Viewing 1 replies (of 1 total)
  • Thread Starter maloxx

    (@maloxx)

    I’ve found the solution here:
    https://www.ads-software.com/support/topic/120060

    and had to add some js-code (that you need of course. I’ve forgotten that, sorry!)

    I’m using now this code for an autojump menu and it works great!

    <?php wp_dropdown_categories(‘exclude=1,3&orderby=name&hierarchical=1&show_option_none=Kategorien’); ?>

    <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>

Viewing 1 replies (of 1 total)
  • The topic ‘Problem with dropdown categories’ is closed to new replies.