• Resolved test484848484

    (@tellyboxcasting)


    hi guys!

    I am enquiring about custom colours for the category of the job listing. I have already added css for specific categories. On the job listing page the colour changes perfectly fine. Example of css for this

    .job-manager .documentary, .job-types .documentary, .job_listing .documentary {
    color: #f08d3c;
    }

    However, once the user clicks on the job advert and the full job listing page opens, the box that the category sits in does not change colour to the custom css. I don’t know how to set this up per custom category.

    This is the current code for the category box.

    .single_job_listing .meta .job-type {
    color: #fff;
    background-color: #f08d3c;
    }

Viewing 11 replies - 1 through 11 (of 11 total)
  • @tellyboxcasting
    Hi, give us the link where you want to change it.

    Thread Starter test484848484

    (@tellyboxcasting)

    Sorry the link is behind a login wall I wouldn’t be able to give you a direct link that would work.

    Just use this littel add on for the WPJM
    https://www.ads-software.com/plugins/wp-job-manager-category-colors/

    you can set up the colors via the backend and you have to paste this code
    <li class="job-category <?php echo get_the_job_category() ? sanitize_title( get_the_job_category()->slug ) : ''; ?>"><?php the_job_category(); ?></li>
    into
    yourtheme/job_manager/content-single-job_listing-meta.php
    yourtheme/job_manager/content-job_listing.php

    Thread Starter test484848484

    (@tellyboxcasting)

    The above file won’t upload to WP, it looks like there is an error with it. Is there another solution without adding more plugins?

    @tellyboxcasting

    You can add the templates to your theme. It is not an extra plugin…

    Just copy the file from

    wp-job-manager/templates/content-single-job_listing-meta.php

    in folder your theme (the best option is make child-theme to avoid overwrite it): create a new folder named ‘job_manager’ and then paste here the file ‘content-single-job_listing-meta.php’

    Then you can edit this file and in the line 32 you change this:

    			<li class="job-type <?php echo esc_attr( sanitize_title( $type->slug ) ); ?>"><?php echo esc_html( $type->name ); ?></li>
    

    for this:

    <li class="job-category <?php echo get_the_job_category() ? sanitize_title( get_the_job_category()->slug ) : ''; ?>"><?php the_job_category(); ?></li>
    
    Or just put next to it...
    Thread Starter test484848484

    (@tellyboxcasting)

    Ok thanks, then how would I set the colours for my categories?

    I have 5 different ones at the moment.

    Thank you for your help so far ??

    @test484848484

    It is depend how you did it….

    It is impossible to help you like that, without exapmle. Because every category does have own slug.

    And now it is depend how you did add it. If you did like we showed you then you just can add extra CSS:

    li.job-category.slug-category{
    background:#154fa4;
    color:#fff
    }
    Thread Starter test484848484

    (@tellyboxcasting)

    Sorry I think I may have confused everyone.

    I realised I made a mistake, I am looking to change the boxed colour of my job type, I do not have any categories on my website.

    Does that change this?

    it’s the same principle, have to look at the type of your job type and customize the css based

    Thread Starter test484848484

    (@tellyboxcasting)

    all solved!

    good news, great

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Colour of category box in job listing’ is closed to new replies.