• Resolved stosun

    (@stosun)


    Hi,
    I try to create custom job search from with keywords, job_listing_region and job_listing_category according to your tutorial : https://wpjobmanager.com/document/tutorial-creating-custom-job-search-form/
    Both regions and job categories have parent and child levels.
    It works properly except regions.
    Here is code;

    <label for="search_region">?ehirler</label>
     <select id="search_region" name="search_region">
    <option value=<?php job_manager_dropdown_categories( array( 'taxonomy' => 'job_listing_region', 'hierarchical' => 1, 'name' => 'search_regions', 'orderby' => 'name', 'selected' => $selected_region, 'hide_empty' => false ) ); ?></option>
        </select>
      </p>
    
      <p>
     <label for="search_category">?? ?lan? Kategorisi</label>
     <select id="search_category" name="search_category">
     <option value=<?php job_manager_dropdown_categories( array( 'taxonomy' => 'job_listing_category', 'hierarchical' => 1, 'name' => 'search_categories', 'orderby' => 'name', 'selected' => $selected_category, 'hide_empty' => true ) ); ?></option>
    </select>

    How can I solve it?

    Thanks at advance for your cooperation.
    Best Regards

    https://www.ads-software.com/plugins/wp-job-manager/

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

    (@stosun)

    Hi,
    I solved it.
    Below, I gave full code for custom search, consists of keywords, two level dropdown cities and three level job listing categories;

    <form method="GET" action="https://ozgunwebtasarimi.com/jobs/">
      <table class="myform">
      <tr>
      <td class="mytd1">
        <label for="keywords">Keywords</label>
        <input type="text" id="search_keywords" placeholder="Enter keyword" name="search_keywords" />
     </td>
      <td class="mytd2">
        <label for="search_region">Cities</label>
        <select id="search_region" name="search_region">
        <option value>Select city</option>
          <option value=<?php job_manager_dropdown_categories( array( 'taxonomy' => 'job_listing_region', 'hierarchical' => 1, 'name' => 'search_regions', 'orderby' => 'name', 'selected' => $selected_region, 'hide_empty' => true ) ); ?></option>
        </select>
     </td>
      <td class="mytd3">
      	<label for="search_category">Job listing categories</label>
      	<select id="search_category" name="search_category">
        <option value>Select job listing category</option>
         <option value=<?php job_manager_dropdown_categories( array( 'taxonomy' => 'job_listing_category', 'hierarchical' => 1, 'name' => 'search_categories', 'orderby' => 'name', 'selected' => $selected_category, 'hide_empty' => true ) ); ?></option>
      	</select>
      </td>
      <td class="mytd4">
        <input type="submit" value="Search" />
      </td>
      </tr>
       </table>
    </form>

    I hope it helps to someone.
    regards

Viewing 1 replies (of 1 total)
  • The topic ‘Region drop down at custom job search form’ is closed to new replies.