• arioman

    (@arioman)


    hi , i need to create a drop down list in widget

    i can put some code like this in my widget as code :

    <select autofocus>
    <option value=”volvo”>Volvo</option>
    <option value=”saab”>Saab</option>
    <option value=”opel”>Opel</option>
    <option value=”audi”>Audi</option>
    </select>

    but it`s not dynamic and nice

    i search for plugins but couldnt find any , and i found some tutorial on web like put these code in header.php

    <?php
    $arr = get_categories();
    echo “<select name=’categorylist’>”;
    foreach($arr as $option){
    echo “<option value='{$option}’>{$option->name}</option>”;
    }
    echo “</select>”;
    ?>

    but i dont want to edit template too !! so do you know any plugin for that ??

Viewing 1 replies (of 1 total)
  • Will Schmierer

    (@officialwill)

    Have you considered creating a custom menu with the categories and then in the widgets section add the custom menu widget and select the menu you created? That might be the best way to achieve what you’re after without editing code or doing something more custom. Hope that helps.

Viewing 1 replies (of 1 total)
  • The topic ‘need to create Drop down list of categories (menu) as Widget’ is closed to new replies.