Support » Plugin: WP Job Manager » how to display salary field on single page on [jobs]

  • Resolved rohitkalra

    (@rohitkalra)


    I added salary field with the help of tutorial but every time I have to click on particular job listing to see salary .I want to display on job listings .I also added salary filter but salary is not showing on job listing page.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Jake Morrison

    (@jakeom)

    Hi there!

    To add the new salary field on the [jobs] search results list, you could use the job_listing_meta_start (or job_listing_meta_end action in a similar way the tutorial has you add it to the single job listing page using the single_job_listing_meta_end action.

    Assistance with implementing or troubleshooting customization is outside of the scope of the support that we offer, per our Support Policy:

    https://wpjobmanager.com/support-policy/.

    If you need it, you can search for development help in a variety of places — here are a few to start:

    http://jobs.wordpress.net/
    https://jetpack.pro/
    https://codeable.io/?ref=l1TwZ

    Jake

    Thread Starter rohitkalra

    (@rohitkalra)

    but it doesn’t work i tried this code job listing only instead of single job listing
    I know it’s out of scope but still I want to learn ,right now I have installed wordpress locally and will move it to live site soon. Any one here who can help me.

    Plugin Contributor Dan

    (@drawmyface)

    You’d need to show exactly what you have added and where if you want anyone to be able to advise on this.

    Thread Starter rohitkalra

    (@rohitkalra)

    @drawmyface
    I have added salary with the help of tutorial
    I was able to show on single job listing
    job submission and in
    search bar
    but I am unable to show on [jobs], the page where we show all listings .On jobs page ,it shows few fields from single listing like company name ,date posted , job type, location. In single job listing, I am able to see my additional fields that I added like salary, experience etc but unable to show on [jobs] page

    • This reply was modified 2 years ago by rohitkalra.
    Plugin Contributor Dan

    (@drawmyface)

    What code are you using to try to display the salary on the jobs page?

    Thread Starter rohitkalra

    (@rohitkalra)

    @drawmyface I tried the same code which I used in single job listing but remove the word single as @jakeom mention on the above post but it’s not working.

    Plugin Contributor Dan

    (@drawmyface)

    The following code works to add the salary to the single job page and the job listings page:

    // Add to single job listing
    
    add_action( 'single_job_listing_meta_end', 'display_job_salary_data' );
    
    function display_job_salary_data() {
      global $post;
    
      $salary = get_post_meta( $post->ID, '_job_salary', true );
    
      if ( $salary ) {
        echo '<li>' . __( 'Salary:' ) . ' $' . esc_html( $salary ) . '</li>';
      }
    }
    
    // Add to jobs page
    
    add_action( 'job_listing_meta_end', 'display_job_salary_data' );

    If you can’t get that to work, you’ll need to get some help from a developer.

    Thread Starter rohitkalra

    (@rohitkalra)

    @drawmyface
    Thanks, it worked

    Thread Starter rohitkalra

    (@rohitkalra)

    @drawmyface how to change placeholder of location from london to any location

    Plugin Contributor Dan

    (@drawmyface)

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘how to display salary field on single page on [jobs]’ is closed to new replies.