• Resolved sjo007

    (@sjo007)


    Hi Adam,

    Great plugin and many thanks for sharing it.

    I have added the salary fields as per your excellent document however I cannot get the Salary Filter to be added to the Job Search Form (that has Keywords and Location in it).

    I have added the code to my child theme functions.php file – is this right file to place it or should I be placing it elsewhere please ?

    Thanks for the help.

    Best regards,

    Stephen

    https://www.ads-software.com/plugins/wp-job-manager/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter sjo007

    (@sjo007)

    Hi,

    I am using the latest version of the plugin 1.25. I have tried to paste the code here I am using without success and am using backticks. However it is identical to the documentation with the exception of the top < php ? >

    Many thanks for the help

    Stephen

    Thread Starter sjo007

    (@sjo007)

    add_action( 'job_manager_job_filters_search_jobs_end', 'filter_by_salary_field' );
    
    function filter_by_salary_field() {
    	?>
    	<div class="search_categories">
    		<label for="search_categories"><?php _e( 'Salary', 'wp-job-manager' ); ?></label>
    		<select name="filter_by_salary" class="job-manager-filter">
    			<option value=""><?php _e( 'Any Salary', 'wp-job-manager' ); ?></option>
    			<option value="upto20"><?php _e( 'Up to £20,000', 'wp-job-manager' ); ?></option>
    			<option value="20000-40000"><?php _e( '£20,000 to £40,000', 'wp-job-manager' ); ?></option>
    			<option value="40000-60000"><?php _e( '£40,000 to £60,000', 'wp-job-manager' ); ?></option>
    			<option value="over60"><?php _e( '£60,000+', 'wp-job-manager' ); ?></option>
    		</select>
    	</div>
    	<?php
    }
    Plugin Contributor Dan (a11n)

    (@drawmyface)

    That should work. Did you try adding the rest of the code there too?

    You can also try adding the field directly to the job_filters.php template file.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Search by Salary’ is closed to new replies.