WP Jobs Manager Job Types Filter unchecked and display jobs

I’m trying to create some kind of custom WP Jobs Manager, where all the box are unchecked (and all jobs displayed), and once you check a box it shows only those ones.

Here’s a demo: http://themarksmaker.com/testwp/index.php/jobs/

In this one I deleted this line:

<?php checked( in_array( $type->slug, $selected_job_types ), true ); ?>

in this code ( job-filter-types.php ):

<?php foreach ( get_job_listing_types() as $type ) : ?>
<li><label for=”job_type_<?php echo $type->slug; ?>” class=”<?php echo sanitize_title( $type->name ); ?>”><input type=”checkbox” name=”filter_job_type[]” value=”<?php echo $type->slug; ?>” <?php checked( in_array( $type->slug, $selected_job_types ), true ); ?> id=”job_type_<?php echo $type->slug; ?>” /> <?php echo $type->name; ?></label></li>
<?php endforeach; ?>

and as you can see in demo my checkboxes are unchecked, and it works ok in displaying them when I check a specific box, but when no boxes are checked there aren’t any jobs. How can I display them?

And is there any way I can duplicate this Job Type Filter? ( I may want to filter on 4 different fields, City, Experience, Position, Department )?

Everything else is default.

Read more here:: WP Jobs Manager Job Types Filter unchecked and display jobs

Leave a Reply

Your email address will not be published. Required fields are marked *