Title: Adding Custom Salary Field
Last modified: August 21, 2016

---

# Adding Custom Salary Field

 *  Resolved [kfan21](https://wordpress.org/support/users/kfan21/)
 * (@kfan21)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/adding-custom-salary-field/)
 * Hi,
 * I would like to add a custom field for salary in both the front and backend. 
   I have read through the forums and the documentation and have not been able to
   get this field added. Do you have a tutorial or more specific steps you could
   provide on how to do this?
 * Thank you in advance,
    Kate
 * [http://wordpress.org/plugins/wp-job-manager/](http://wordpress.org/plugins/wp-job-manager/)

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

 *  Plugin Author [Mike Jolley](https://wordpress.org/support/users/mikejolley/)
 * (@mikejolley)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/adding-custom-salary-field/#post-4344883)
 * There is a detailed example [https://github.com/mikejolley/WP-Job-Manager/wiki/Editing-Job-Submission-Fields](https://github.com/mikejolley/WP-Job-Manager/wiki/Editing-Job-Submission-Fields)
 * If you cannot manage that, I’d recommend getting someone to do it via Codeable
   or Tweaky.
 *  Thread Starter [kfan21](https://wordpress.org/support/users/kfan21/)
 * (@kfan21)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/adding-custom-salary-field/#post-4344898)
 * Thank you, I had not previously seen those instructions. It is now added to the
   front end. It is not showing in the admin area.
 * Now, I am working on showing the new salary on the content-job_listing.php template.
   The salary is not showing.
 * I added this code to my themes functions.php
 *     ```
       function get_the_job_salary( $post = null ) {
       	$post = get_post( $post );
   
       	if ( $post->post_type !== 'job_listing' )
       		return;
   
       	return apply_filters( 'the_job_salary', $post->_job_salary, $post );
       }
       ```
   
 * Then I added this line to show it on the content-job_listing.php
 *  `<li class="date"><?php echo the_job_salary(); ?></li>`
 * What I am doing wrong that it is not showing? Thank you for your help.
 *  Plugin Author [Mike Jolley](https://wordpress.org/support/users/mikejolley/)
 * (@mikejolley)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/adding-custom-salary-field/#post-4344901)
 * the_job_salary doesn’t exist. Use [http://codex.wordpress.org/Function_Reference/get_post_meta](http://codex.wordpress.org/Function_Reference/get_post_meta)
 *  Thread Starter [kfan21](https://wordpress.org/support/users/kfan21/)
 * (@kfan21)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/adding-custom-salary-field/#post-4344904)
 * I feel like I am so close, but still so far from getting this field to display
   on my Jobs. Can you hold my hand a little on this one?
 * I have changed content-job_listings.php to:
 *     ```
       <li class="date"><?php
       $job_salary_value = get_post_meta( get_the_ID(), 'job_salary', true );
       // check if the custom field has a value
       if( ! empty( $job_salary_value ) ) {
         echo $job_salary_value;
       }
       ?>
        </li>
       ```
   
 *  Plugin Author [Mike Jolley](https://wordpress.org/support/users/mikejolley/)
 * (@mikejolley)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/adding-custom-salary-field/#post-4344916)
 * Try `$job_salary_value = get_post_meta( get_the_ID(), '_job_salary', true );`

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

The topic ‘Adding Custom Salary Field’ is closed to new replies.

 * ![](https://ps.w.org/wp-job-manager/assets/icon-256x256.gif?rev=2975257)
 * [WP Job Manager](https://wordpress.org/plugins/wp-job-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-job-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-job-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-job-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-job-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-job-manager/reviews/)

## Tags

 * [Add Custom Field](https://wordpress.org/support/topic-tag/add-custom-field/)

 * 5 replies
 * 2 participants
 * Last reply from: [Mike Jolley](https://wordpress.org/support/users/mikejolley/)
 * Last activity: [12 years, 8 months ago](https://wordpress.org/support/topic/adding-custom-salary-field/#post-4344916)
 * Status: resolved