[wpjb_jobs_list]

wpjb-jobs-list

Displays list of jobs (using design similar to the one default jobs list is using), the list of jobs can be modified using multiple parameters.

Available parameters:

  • filter
    Allowed values: active (jobs visible on the job board), expired (jobs that already expired), expiring (jobs that will expire in 5 days), awaiting (jobs that are awaiting approval), new (jobs posted less than 5 days ago), unread (jobs not viewed by admin), inactive (jobs deactivated by admin), all (all jobs)

    Default value is “active”

  • query
    Passing non empty query will return only jobs with matching keyword in title or description

  • category
    Job category ID, will only list jobs from matching category.

    In order to get jobs from multiple categories, you can separate catgory IDs with coma (see second example below).

  • type
    Job type ID, will only list jobs with matching job type
    In order to get jobs from multiple job types, you can separate catgory IDs with coma (see second example below).

  • country
    Country ID, note that only numeric ISO-3166-1 codes are accepted, for example if you wish to display jobs from USA only then valid value will be 840.

  • state
    Allows to search jobs by state (as a country region) (since 4.0.1)
  • location
    Allows to search jobs by country (iso codes and full country name), state, zip code and city

  • is_featured
    Allowed values are 0 and 1,  if is_featured will be set to 1 then only featured jobs will be listed (the default value is 0).

  • employer_id
    Passing employer_id will list only jobs posted by selected employer.

    In order to get jobs from multiple employers, you can separate catgory IDs with coma (see second example below).

  • meta__$key
    Allows to search jobs by cusom fields, for example if you have created custom field named “skills”, you can list jobs with “skills” equal to “PHP” by passing “meta__skills” parameter to the shortcode (see third example below).

  • sort_order
    How jobs should be sorted, the default value is: first by is_featured, next by job_created_at and id.

    Changing sort order requires some PHP knowledge but is not that hard. First you need to find column in wp_wpjb_job table by which you want to sort jobs, lets say it will be descending by expiration date (column job_expires_at), then as a sort value pass “t1.job_expires_at DESC” if you would like sort jobs ascending replace DESC with ASC (see 4th example below)

  • pagination
    Show pagination on site, default value is 1, note that the pagination if enabled will show only if there is more than one page of results.
  • page
    The page number to show, default value is 1, while possible, it is not recommended to change the default value, as this will break pagination

  • count
    Number of jobs per page, the default value is 20, if you change it to 0 then all jobs will be listed on single page.

  • id__not_in
    List of job IDs to exclude from search (since 4.0.1)

  • search_bar
    String either: disabled, enabled or enabled-live. Default value disabled (since 4.1.2)

  • page_id
    (int) ID of a Page to which this shortcode will link to when for example doing a search, by default the value is current page ID (since 4.3.4)

 

Usage examples:

Find inactive jobs matching keyword “php developer”.

[wpjb_jobs_list filter="inactive" query="php developer"]

Displaying jobs posted in category 1 or 3 (or both).

[wpjb_jobs_list category="1,3"]

Searching for jobs that have Custom Field “skills” with value equal to “PHP”

[wpjb_jobs_list meta__skills="PHP"]

Sort jobs by expiration date and ID

[wpjb_jobs_list sort_order="t1.job_expires_at DESC, t1.id DESC"]

CSS Customization

/* Remove logo column */
.wpjb-job-list .wpjb-grid-col.wpjb-col-logo {
 display: none;
}
/* Changed featured row background */
body .wpjb .wpjb-featured {
 background-color: lightgreen;
}

/* Remove name the company */
.wpjb-col-title .wpjb-sub.wpjb-sub-small {
    display: none
}

/* Remove banner "NEW" */
span.wpjb-bulb {
    display: none !important;
}

/*Change text color */
wpjb-job-list .wpjb-col-title a {
    color: red !important;
}

/*Remove name the company and change the color of the name work*/
.wpjb-job-list .wpjb-sub-small {
    display: none !important;
}

/*Remove time work*/
.wpjb-col-location .wpjb-sub.wpjb-sub-small {
    display: none;
}

All the changes from above you can put in your theme CSS file.

  1. what is the shortcode to sort by recent jobs 1st, no matter featured or not.

    thank you

    • Greg
      Reply

      Following shortcode will do this
      [wpjb_jobs_list sort_order=”t1.job_created_at DESC”]

      • Ferdinand
        Reply

        Hi Greg, I tried this code but it didn’t work. Any idea?

  2. Mateusz
    Reply

    What if I want to list all jobs outside specific country?
    And why there’s no pagination in the results?

    • Greg
      Reply

      Excluding (countries and other params except IDs) is not possible with this shortcode i am afraid. The pagination will be shown only if there is more than one page of results.

    • how to limit the jobs into specific numbers to be posted?

      • Greg
        Reply

        Not sure what do you mean by “specific numbers to be posted”?

    • Greg
      Reply

      This seems to be an issue with coping and pasting the shortcode. Please go to wp-admin / Pages panel and click Edit link next to your “Landing Page”, now in the editor click “Text” tab and look for the [wpjb_jobs_list] shortcode

      Most likely it is inside <pre> or <code> tag, if it is then remove those tags (</pre> and </code> as well) and save the page, it should be ok now.

      • yaoming
        Reply

        thanks for the update, your suggestion fix the problem 🙂

  3. Anton
    Reply

    Is it possible to show only the available categories on a single page? Like one see in the sidebar?

  4. Where do I go to change the [wpjb_jobs_list] number of jobs to 25?

    • Greg
      Reply

      For shortcodes you only change params
      [wpjb_jobs_list count=”25″]

  5. Tejas Paliwal
    Reply

    Hi,
    can I explore the jobs by specific Date? My client want to list according to the specific date.

  6. Greg
    Reply

    Is it possible to sort by a custom field with the shortcode? Or another route?

  7. How to list or search jobs with a specific company category(by business type)?

    • This is not really possible i am afraid, you can list jobs either by job category (using “category” param) or by Employer (using “employer_id”) param.

  8. James
    Reply

    Hi Greg

    I’d like to create pages in my site that show jobs just in that location.

    For example London, Manchester etc

    Is there a short code for that please?

    Thanks

  9. Greg
    Reply

    Hi, you can use wpjb_jobs_list shortcode with location param for this
    [wpjb_jobs_list location=”London”]

    • James
      Reply

      Hi Greg

      Thanks

      I’ve tried that but it doesn’t show any jobs and just says ”
      No job listings found.”

      • Greg
        Reply

        I would need you to send me link to this page and exact shortcode you are using (ideally via email).

        • James
          Reply

          Hi Greg

          Just sent you an email, ignore it I’m an idiot lol.

          All sorted now. Thanks for the excellent customer service as always.

  10. Is there a variable for random sort each time page is reloaded?

    • Greg
      Reply

      Try using this shortcode with param sort_order=”RAND()” this should always display jobs in random order.

      • I just tried it and the page comes up blank with only the filter box.

  11. I got it it looks like this: [wpjb_jobs_list sort_order=’rand()’] works great!!! thanks!

  12. Leon
    Reply

    How can i display the salary for each job?

    If you could please tell me which template file to edit and template tag to add, I can take it from there.

    Many thanks!

  13. Hi Greg
    Is it possible to output the SQL statement that would give me Featured Jobs please? I have tried this but seem to get duplicates when joining jobs, tag and tagged in my query.
    Thanks, Dan

  14. Can you show results with more than 1 country id using a comma to separate?

    • Greg
      Reply

      I am afraid right now you can select all countries or just one.

  15. Darlington
    Reply

    Is there a shortcode for the job list to display feature jobs first?

    • Greg
      Reply

      Actually, the [wpjb_jobs_list] by default displays featured jobs first and “normal” jobs below.

Leave a Reply

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