Exemple #1
0
 * The template for displaying the WP Job Manager Filters
 *
 * @package Listable
 */
?>

<?php 
if (listable_using_facetwp()) {
    ?>

	<div class="job_filters">
		<div class="search_jobs">

		<?php 
    $facets = listable_get_facets_by_area('listings_archive_visible');
    $navigation_facets = listable_get_facets_by_area('navigation_bar');
    $all_facets = listable_get_all_facets();
    if (!empty($facets)) {
        foreach ($facets as $key => $facet) {
            foreach ($navigation_facets as $nav_facet) {
                //@todo we should do a little bit of sanity check here - if the facet actually exists
                if ($facet['name'] == $nav_facet['name']) {
                    unset($facets[$key]);
                }
            }
        }
        $facets = array_values($facets);
        listable_display_facets($facets);
    }
    ?>
<?php

/**
 * The template for displaying the WP Job Manager Filters on the front page hero
 *
 * @package Listable
 */
?>

<?php 
if (listable_using_facetwp()) {
    $facets = listable_get_facets_by_area('front_page_hero');
    $fields_num = count($facets);
    if ($fields_num > 0) {
        ?>

		<div class="search_jobs  search_jobs--frontpage  search_jobs--frontpage-facetwp<?php 
        echo 1 == $fields_num ? '  has--one-field' : '';
        ?>
">

			<?php 
        listable_display_facets($facets);
        ?>

			<button class="search-submit" name="submit" id="searchsubmit" onclick="facetwp_redirect_to_listings()">
				<?php 
        get_template_part('assets/svg/search-icon-svg');
        ?>
				<span><?php 
        esc_html_e('Search', 'listable');