Support » Fixing WordPress » How to make Search Form with Custom Taxonomy Dropdown

  • hey guys, I wanna make Search Form with Custom Taxonomy Dropdown to my website and I made it but It doesnt work. I dont know why it doesnt work.
    I call it as “drop-down-taxonomy.php” in kutuphane folder and I use this code in functions.php “include ‘kutuphane/drop-down-taxonomy.php’; “
    and also I use this code to show it on sidebar:

    <div id="browselist" class="clearfix">
    <h3 class="sidetitle">Arama Listesi</h3>
    <p class="listin"><span>Semt</span><br/><?php the_dropdown_taxonomy('semt'); ?></p>
    <p class="listin"><span>Listeleme Durumu</span><br/><?php the_dropdown_taxonomy('mdurumu'); ?></p>

    I use this code(drop-down-taxonomy.php):

    function the_dropdown_taxonomy($taxonomy) {
      $id = "{$taxonomy}-dropdown";
      $js =<<<SCRIPT
    <script type="text/javascript">
        window.location.href = $(this).val();
      echo $js;
      $terms = get_terms($taxonomy);
      echo "<select name=\"{$id}\" id=\"{$id}\">";
    echo '<option value="#"> - Select - </option>';
      foreach($terms as $term) {
        echo '<option value="';
        echo get_term_link(intval($term->term_id),$taxonomy);
        echo '">' . "{$term->name}</option>";
      echo "</select>";
    function jquery_init() {

    When I wrote these code, I can see search form with taxonomy dropdown but when I click or enter, It doesnt work :/
    Who will help me about this quesiton?

    Notice: I cant talk fluent so write me using simple language

  • The topic ‘How to make Search Form with Custom Taxonomy Dropdown’ is closed to new replies.