Support » Plugin: WP Job Manager » Homepage Search Filters *Specific Keyword Drop Down*

  • Resolved kaluminatie

    (@kaluminatie)


    At the top of he homepage i have 2 “search filters” Regions and Keywords. In the regions drop down it shows state AND county. i would like this to show only the state. in the “keywords” box (type your county here) i would like that to be a drop down as well but only list the counties for the selected state in the “regions” box. I have tried a couple things, but no attempts work correctly. The state and county are both within the “listing Categories” section. Is there a way possibly to have the “keywords” box show the geolocation_city from the custom fields section OR show the counties from the “listing categories” section?

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • @kaluminatie Hey, I want to know what is the shortcode for your search filters. Thanks in advance.

    kaluminatie

    (@kaluminatie)

    <?php
    /**
    * Search filters for the homepage.
    *
    * This is the same as job-filters.php except it uses a different class
    * as not to interfer with the WP Job Manager AJAX triggers.
    *
    * @since unknown
    */

    global $listify_job_manager;

    $atts = apply_filters( ‘job_manager_output_jobs_defaults’, array(
    ‘per_page’ => get_option( ‘job_manager_per_page’ ),
    ‘orderby’ => ‘featured’,
    ‘order’ => ‘DESC’,
    ‘show_categories’ => true,
    ‘categories’ => true,
    ‘selected_category’ => false,
    ‘job_types’ => false,
    ‘location’ => false,
    ‘keywords’ => false,
    ‘selected_job_types’ => false,
    ‘show_category_multiselect’ => false,
    ‘selected_region’ => false,
    ‘flat’ => true,
    ) );

    $filters = Listify_WP_Job_Manager_Template_Filters::get_filters( ‘home’, $atts );

    if ( empty( $filters ) ) {
    return;
    }
    ?>

    <?php do_action( ‘job_manager_job_filters_before’, $atts ); ?>

    <form class=”job_search_form job_search_form–count-<?php echo absint( count( $filters ) ); ?>” action=”<?php echo get_post_type_archive_link( ‘job_listing’ ); ?>” method=”GET”>
    <?php do_action( ‘job_manager_job_filters_start’, $atts ); ?>

    <div class=”search_jobs”>
    <?php do_action( ‘job_manager_job_filters_search_jobs_start’, $atts ); ?>

    <?php foreach ( $filters as $key => $filter ) : ?>
    <?php echo $filter; ?>
    <?php endforeach; ?>

    <?php do_action( ‘job_manager_job_filters_search_jobs_end’, $atts ); ?>
    </div>

    <?php do_action( ‘job_manager_job_filters_end’, $atts ); ?>
    </form>

    <?php do_action( ‘job_manager_job_filters_after’, $atts ); ?>

    dubaidogfish

    (@dubaidogfish)

    You might be able to use WP Field editor to use conditional logic on the menus in a similar way gravity forms has the chained selects addon.

    I looked at your site I presume it’s running WPJM 1.33/1.33.1? This breaks the search by region function that worked in 1.32.3. If I select one of your regions and search all 829 results get returned no matter which region I choose. Correct?

    Plugin Contributor Richard Archambault

    (@richardmtl)

    Note that we have a fix for it, to be released soon: https://github.com/Automattic/WP-Job-Manager/pull/1793

    You can implement the change in the plugin code yourself, it’s quite simple:

    https://github.com/Automattic/WP-Job-Manager/pull/1793/files

    Plugin Contributor Richard Archambault

    (@richardmtl)

    I’m marking this thread as Resolved as it’s been more than a month since the last reply. If you still need help, please do reply again and mark the thread as Unresolved!

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.