Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Mike Jolley

    (@mikejolley)

    Hi,

    Take a look at https://wordpress.org/plugins/wp-job-manager-locations/

    Sorting by job_type isn’t supported because its a taxonomy. There is no simple, efficient way to sort posts by a term inside the post unfortunately. It would kill performance.

    Thread Starter jlynch_wp

    (@jlynch_wp)

    Ok. Is there a way to have (by default) certain job_type boxes selected?

    Plugin Author Mike Jolley

    (@mikejolley)

    For the filters you mean? Or during job submission?

    Thread Starter jlynch_wp

    (@jlynch_wp)

    On the search filters

    Plugin Author Mike Jolley

    (@mikejolley)

    Only by editing this file https://github.com/mikejolley/WP-Job-Manager/blob/master/templates/job-filters.php or overriding it (see the docs).

    I’ve logged an issue to make this easier for the future version https://github.com/mikejolley/WP-Job-Manager/issues/169

    Thread Starter jlynch_wp

    (@jlynch_wp)

    Would I need to place the slug labels (i.e. slug1, slug2) for the default checkboxes that I need somewhere within this bit of code?

    <ul class="job_types">
    			<?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(1,1); ?> id="job_type_<?php echo $type->slug; ?>" /> <?php echo $type->name; ?></label></li>
    			<?php endforeach; ?>
    		</ul>
    Plugin Author Mike Jolley

    (@mikejolley)

    I’d swap:

    <?php checked(1,1); ?>

    And make that something like:

    <?php checked( in_array( $type->slug, array( 'full-time', 'part-time' ) ) , true ); ?>

    Tweak the array to your needs.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Job List Search Options’ is closed to new replies.