コード例 #1
2
<?php

/**
 * The template for displaying the WP Job Manager start part of the listings list
 *
 * @package Listable
 */
?>

<?php 
if (listable_using_facetwp()) {
    do_action('listify_facetwp_sort');
    $output = '';
    $output .= facetwp_display('template', 'listings');
    $output .= facetwp_display('pager');
    echo $output;
} else {
    ?>

<div class="grid list job_listings">

<?php 
}
コード例 #2
1
ファイル: facetwp.php プロジェクト: swaroop42/RockRose
function listable_get_display_facets($facets)
{
    $output = '';
    if (!empty($facets)) {
        foreach ($facets as $facet) {
            $output .= facetwp_display('facet', $facet['name']);
        }
    }
    return $output;
}
コード例 #3
0
ファイル: facetwp-search.php プロジェクト: dannyoz/tls
						<div id="sorter">
							<span>Sort:</span>
							<?php 
echo facetwp_display('sort');
?>
						</div>

					</div>

					<?php 
echo facetwp_display('template', 'default');
?>


					<div><?php 
echo facetwp_display('pager');
?>
</div>

				</div>

				<div tls-loading="loadResults"></div>

			</div>

		</div>

	</section>

<?php 
get_footer();
コード例 #4
0
 public function output_facets()
 {
     global $listify_facetwp;
     $facets = $listify_facetwp->get_facets();
     $count = count($facets);
     $column = 0 == $count ? 12 : round(12 / $count);
     $done = 0;
     if ($count > 3) {
         $column = 4;
     }
     $class = 'col-xs-12 col-sm-6 col-md-' . $column;
     if ('side' == $this->position()) {
         $column = null;
         $class = 'widget';
     }
     $output = array();
     foreach ($facets as $key => $facet) {
         if ('side' != $this->position() && ($count > 3 && $done == 3)) {
             $output[] = '</div><div class="row">';
         }
         $output[] = '<aside class="facetwp-filter ' . $class . ' widget-job_listing-archive"><h2 class="widget-title">' . esc_attr($facet['label']) . '</h2>' . facetwp_display('facet', $facet['name']) . '</aside>';
         $done++;
     }
     return implode('', $output);
 }
コード例 #5
0
ファイル: header-fields.php プロジェクト: swaroop42/RockRose
            listable_display_facets($facets);
            ?>

				<?php 
            if (is_singular('job_listing')) {
                ?>

					<button class="search-submit" name="submit" id="searchsubmit" onclick="FWP.refresh();facetwp_redirect_to_listings();">
						<?php 
                get_template_part('assets/svg/search-icon-svg');
                ?>
					</button>

					<div style="display: none;">
						<?php 
                echo facetwp_display('template', 'listings');
                ?>
					</div>

					<script>
						(function($) {

							$(document).on('keyup','.header-facet-wrapper input[type="text"]', function(e) {
								if (e.which === 13) {
									//wait a little bit
									setTimeout(
										function() {
											//if the user presses ENTER/RETURN in a text field then redirect
											facetwp_redirect_to_listings();
											return false;
										}, 500);
コード例 #6
0
			<?php 
    if (is_post_type_archive('hikes') || is_author() || is_page_template('template-hikes-map.php')) {
        if (is_page_template('template-hikes-map.php')) {
            echo '<h5 class="filter-title">Hike Proximity</h5>';
            echo facetwp_display('facet', 'location');
        }
        echo '<h5 class="filter-title">Hike Difficulty</h5>';
        echo facetwp_display('facet', 'difficulty');
        echo '<h5 class="filter-title">Hike Rating</h5>';
        echo facetwp_display('facet', 'hike_rating');
    }
    if (is_post_type_archive('reviews') || is_author()) {
        echo '<h5 class="filter-title">Product Rating</h5>';
        echo facetwp_display('facet', 'product_rating');
    }
    if (is_page_template('template-news.php')) {
        echo '<h5 class="filter-title">Article Categories</h5>';
        echo facetwp_display('facet', 'categories');
    }
    ?>
		</div>
	<?php 
}
?>
	<div class="widget-area--ads">
		<?php 
dynamic_sidebar('sidebar-1');
?>
	</div>
</aside><!-- #secondary -->