Support » Plugin: WP Job Manager » Company Logo image thumbnail dimensions

  • Resolved Jon Fuller


    I assume the Company Logo “thumbnail” size is being pulled by the image dimensions set at Settings > Media > Thumbnail size

    I there a way to override the image size for the WP Job Manager company logo, without changing the Thumbnail size for the entire site?

    I see the image is being output by:

    get_the_post_thumbnail( $post->ID, array('class' => 'company_logo') );

    So is there a function I can set to change the size of the company_logo thumbnail?

    It’s currently being cropped to 150px square, but I want it to be larger… since I plan to display it larger than 150px via CSS.

    • This topic was modified 1 year, 11 months ago by Jon Fuller.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Adam Heckler


    I’m not 100% sure on this answer, since I’m not a dev myself, but I think you may first need to override some CSS. We restrict the logo width and height here:

    … and of course your theme may also come into play.

    Anyway, we only call the_company_logo() twice in our own code:

    Pro: WP-Job-Manager $ git grep " the_company_logo("
    changelog.txt:* Tweak the_company_logo() to check if logo is valid URL.
    templates/content-job_listing.php:      <?php the_company_logo(); ?>
    templates/content-single-job_listing-company.php:   <?php the_company_logo(); ?>
    wp-job-manager-template.php:function the_company_logo( $size = 'thumbnail', $default = null, $post = null ) {

    … and don’t pass a size either time, so in theory you could override those using this procedure:

    The files to override in this case are:

    – templates/content-job_listing.php
    – templates/content-single-job_listing-company.php

    That said, we aren’t able to actually write the code for you. You may want to look into one of these services if you need help:


    So is there a way in my functions.php to override this:

    function the_company_logo( $size = 'thumbnail', $default = null, $post = null ) {...

    To be a custom size other than thumbnail?

    Plugin Contributor Adam Heckler


    You can’t override the function itself, but the $size = 'thumbnail' code you see there is just the default. If you pass the_company_logo() a different parameter for the $size argument, it will use that instead of thumbnail.

    So what you need to do is override the 2 instances where we call the_company_logo(). Those are in the two files I listed in my first reply here. I also linked you to a guide that shows you how to override those template files.

    Thanks! 🙂

    Instead of overriding those template files, I just bumped the thumbnail image dimensions for my Media settings, to 250 x 250… instead of the 150 x 150. That works for now, I suppose.

    I’d rather not override too many template files, for such a minor change, in case of a future update.

    Thanks for the help though!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Company Logo image thumbnail dimensions’ is closed to new replies.