示例#1
0
/**
 * JobRoller Filter Form
 * Function outputs the job filters
 *
 *
 * @version 1.0
 * @author AppThemes
 * @package JobRoller
 * @copyright 2010 all rights reserved
 *
 */
function jr_filter_form()
{
    if (get_option('jr_show_filterbar') !== 'no') {
        ?>
	<form class="filter" method="get" action="<?php 
        echo jr_get_current_url();
        ?>
">
		<?php 
        $job_types = get_terms('job_type', array('hide_empty' => '0'));
        if ($job_types && sizeof($job_types) > 0) {
            foreach ($job_types as $type) {
                ?>
				<p><input type="checkbox" name="<?php 
                echo $type->slug;
                ?>
" id="<?php 
                echo $type->slug;
                ?>
" <?php 
                if (isset($_GET[$type->slug]) || !isset($_GET['action'])) {
                    echo 'checked="checked"';
                }
                ?>
 value="show" /> <label for="<?php 
                echo $type->slug;
                ?>
"><?php 
                echo $type->name;
                ?>
</label></p>
				<?php 
            }
        }
        ?>
		<p>
		<input type="submit" value="<?php 
        _e('Filter', 'appthemes');
        ?>
" class="submit" />
		<input type="hidden" name="action" value="Filter" />
		<?php 
        // hidden fields for search
        if (isset($_GET['s'])) {
            echo '<input type="hidden" name="s" value="' . $_GET['s'] . '" />';
        }
        if (isset($_GET['location'])) {
            echo '<input type="hidden" name="location" value="' . $_GET['location'] . '" />';
        }
        if (isset($_GET['radius'])) {
            echo '<input type="hidden" name="radius" value="' . $_GET['radius'] . '" />';
        }
        ?>
		</p>
		<div class="clear"></div>
	</form>
	<?php 
    }
    return jr_process_filter_form();
}
示例#2
0
get_header('search');
?>
	
<?php 
do_action('jobs_will_display');
?>

	<div class="section">

		<?php 
$job_salary_slug = get_query_var('job_salary');
$job_salary = get_term_by('slug', $job_salary_slug, 'job_salary');
?>

		<h1 class="pagetitle"><?php 
echo '<small class="rss"><a href="' . jr_get_current_url() . 'rss"><img src="' . get_bloginfo('template_url') . '/images/feed.png" title="' . single_cat_title("", false) . ' ' . __('Jobs RSS Feed', 'appthemes') . '" alt="' . single_cat_title("", false) . ' ' . __('Jobs RSS Feed', 'appthemes') . '" /></a></small>';
?>
 <?php 
_e('Jobs with a salary of', 'appthemes');
?>
 <?php 
echo wptexturize($job_salary->name);
?>
 <?php 
?>
</h1>

		<?php 
get_template_part('loop', 'job');
?>
示例#3
0
$job_cat_slug = get_query_var('job_cat');
$job_cat = get_term_by('slug', $job_cat_slug, 'job_cat');
?>
		  
		<h1 class="pagetitle"><?php 
echo '<small class="rss"><a href="' . jr_get_current_url() . 'rss"><img src="' . get_bloginfo('template_url') . '/images/feed.png" title="' . single_cat_title("", false) . ' ' . __('Jobs RSS Feed', 'appthemes') . '" alt="' . single_cat_title("", false) . ' ' . __('Jobs RSS Feed', 'appthemes') . '" /></a></small>';
?>
 <?php 
echo wptexturize($job_cat->name);
?>
 <?php 
_e('Jobs', 'appthemes');
?>
 <?php 
if (isset($_GET['action']) && $_GET['action'] == 'Filter') {
    echo '<small>&mdash; <a href="' . jr_get_current_url() . '">' . __('Remove Filters', 'appthemes') . '</a></small>';
}
?>
</h1>
		
		<?php 
$args = jr_filter_form();
$args = array_merge(array('job_cat' => $job_cat_slug), $args);
query_posts($args);
?>
		
		<?php 
get_template_part('loop', 'job');
?>
		
		<?php 
示例#4
0
文件: index.php 项目: besimhu/legacy
?>
 <?php 
if ($paged > 1) {
    ?>
(page <?php 
    echo $paged;
    ?>
)<?php 
}
?>

			<?php 
if (isset($_GET['action']) && $_GET['action'] == 'Filter') {
    ?>
				<small> &mdash; <a href="<?php 
    echo jr_get_current_url();
    ?>
"><?php 
    _e('Remove Filters', 'appthemes');
    ?>
</a></small>
			<?php 
}
?>

		</h2>

		<?php 
$args = jr_filter_form();
query_posts($args);
// call the main loop-job.php file