WP Job Manager
[resolved] Job Category in single view (6 posts)

  1. bffnb
    Posted 1 year ago #


    regarding to this Question:

    http: // wordpress.org/support/topic/displaying-job-category-in-job-listing

    I wanted to add Job Category as well in the job listings single view?

    Cany anybody tell me the exact code to use? I need this function to...!!
    And where should i place it?

    Thank you so much and happy new year!


  2. Mike Jolley
    Plugin Author

    Posted 1 year ago #

    If you don't know what you are doing, be careful, but something like this should do it:

    $terms = wp_get_post_terms( $post->ID, 'job_listing_category' );
    $term   = ! is_wp_error( $terms ) ? current( $terms ) : '';
    if ( $term ) {
       echo $term->name;

    Should output 1 category name.

  3. bffnb
    Posted 1 year ago #


    This is the reason why im asking you as the Plugin Author. Please tell me the exact code and where should i place it to get the category for example benath the orange job type in single view?


  4. Mike Jolley
    Plugin Author

    Posted 1 year ago #

    @bffnb there really is no need to shout - I've already given you the code required to output the name of a job's category, and please remember this is a free plugin and support is voluntary..

    The code needs to go in the template file for a single job listing. FYI the template for a single job's content is found in job-manager/templates/content-single-job_listing.php. This can be overridden via a theme, see: https://github.com/mikejolley/WP-Job-Manager/wiki/Template-overrides

    If you cannot figure it out, perhaps it would be best if you hired a developer to do the customisation for you?

  5. bffnb
    Posted 1 year ago #


    Im not shouting... i like your plugin it is great.
    But in my opinion it will be awesome if you or other plugin
    authors can tell us the exact changes to make - instead of answering
    2 or more times with the near HALF answer :) Or just answer nothing...

    The most plugin users are not coding guys like you. And in my opinion this info should be included in the single view. i dont think it is a big thing to make this happen


  6. Mike Jolley
    Plugin Author

    Posted 1 year ago #

    I'm happy to give people guidance - but what I'm not prepared to do is code full customisations. If I did, you'd learn nothing. By giving 'half answers' I'm trying to encourage you to learn, rather than copy/paste mindlessly and then come back a day later with more customisation requests. Hope that makes sense.

    I've now given you the code and told you where it goes - you just need to experiment/use your initiative :)

    Categories are not really useful for single view because job-manager disables the archives - if you were however building a *theme* for job manager with full custom post type support + archives you would want to add them.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Job Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.