• Dear sir/madam,

    A year ago someone posted a question ’bout the possibility for the job regions to show them in the search widget as a dropdown. I figured out how to make this possible. In the themes folder open up inc/job-filters.php

    under the $s_categories variable add:
    $s_regions = get_terms(‘job_listing_region’);

    now if you do a var_dump($s_regions); it will output all the regions that are available. With this info you can develop a dropdown for your purpose ;).

    If you need the markup for the dropdown, just let me know i’ll post it here!

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

Viewing 11 replies - 16 through 26 (of 26 total)
  • Thread Starter rocketsciencebv

    (@littlebigagency)

    Google Chrome Inspector -> press F12 when in Google Chrome -> Press the network tab -> Clear the network list by clicking the icon right next to the red dot

    Now in the website press our dropdown and choose a region -> you will see in the network tab of the inspector a file called admin-ajax.php, click that -> make sure you select the ‘headers’ tab -> scroll down a bit and check the form data stated under this tab…

    action:job_manager_get_listings
    search_keywords:
    search_location:
    search_region:Β?ρεια Προ?στια Αττικ??
    search_categories[]:0
    filter_job_type[]:freelance
    filter_job_type[]:full-time
    filter_job_type[]:part-time
    filter_job_type[]:internship
    filter_job_type[]:temporary
    per_page:10
    orderby:featured
    order:DESC
    page:1
    show_pagination:false
    form_data:search_keywords=&search_region=%CE%92%CF%8C%CF%81%CE%B5%CE%B9%CE%B1+%CE%A0%CF%81%CE%BF%CE%AC%CF%83%CF%84%CE%B9%CE%B1+%CE%91%CF%84%CF%84%CE%B9%CE%BA%CE%AE%CF%82&search_categories=0&filter_job_type%5B%5D=freelance&filter_job_type%5B%5D=full-time&filter_job_type%5B%5D=part-time&filter_job_type%5B%5D=internship&filter_job_type%5B%5D=temporary

    ^Here you go. Thanks for the tip!

    Thread Starter rocketsciencebv

    (@littlebigagency)

    Will get back to you on that. Will check somewhere this weekend!

    Thanks – I truly appreciate it. Have a great weekend ahead.

    Thread Starter rocketsciencebv

    (@littlebigagency)

    Hi jobme,

    I’ve altered the job-filters.php on github. That first fix should eliminate the space bug for good. For the russian? or other strange language I see I think you will have to check your mysql charset. More on that here https://stackoverflow.com/questions/4404768/cant-insert-russian-text-into-mysql-database

    Let me know if this works out, otherwise have to check this for future implementations of my script for other people!

    Ok – the slug trick fixed it. Both the special chars and the spaces.

    If I’m not mistaken the way you made the job-filters removes the main search input “search-keywords”.

    On my copy I want this, so I made all the changes you made manually, and left my search-keywords intact.

    Now, no matter what i put in the search-keywords input, it displays all jobs.

    Any idea how to fix that?

    I truly appreciate the assistance you provide me with. Thank you.

    april

    (@aprilmaynard)

    Hey guys, thanks for this – but where do I put these files? How do I display the list?

    april

    (@aprilmaynard)

    Advanced Menu Widget does this beautifully, for anyone looking.

    awesome fix, particularly together with advanced menu widget. will you make a pull request to the astoundify plugin so that this is properly implemented without us needing to edit manually after an update?

    Hello,

    According to my experience the “WP Job Manager – Predefined Regions” produced by Astoundify does not work. Can someone help me to get a plugin that enables the user to select a region in the “WP Job manager” plugin?

    I have absolutely no experience with coding Plugins and would not know what to look for even if someone gave code to insert.

    Look forward to hearing from you.

    Kind regards,

    Yunis

Viewing 11 replies - 16 through 26 (of 26 total)
  • The topic ‘Job regions as dropdown IS possible’ is closed to new replies.