Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to show company logo in job listing, as opposed to just job posting #45

Open
mcfruitbat opened this issue Jul 17, 2020 · 1 comment

Comments

@mcfruitbat
Copy link

I think this same question was asked via the now redundant forum, and hence no advice.

Hoping you're able to assist?

Many thanks,

Rob

@cdefy
Copy link

cdefy commented Jul 20, 2020

Hi @mcfruitbat ,

I'm just another plugin user but if I understand well what you want to do:

  1. You'll need to make a copy of job-preview.php in your child theme. The path should be themes > your_theme > jobs > preview > job-preview.php

  2. To get the company logo you can add this code:

// Get the logo
$cie_logo = get_post_meta($post_id, 'position_logo', true);
// If no logo, use your default one
if(!$cie_logo) {
  $cie_logo = esc_url( get_stylesheet_directory_uri() . '/assets/images/your_default_logo.png' );
 }
  1. You can also get the company name so you'll have a alt for your img:
    $cie_name = get_post_meta($post_id, 'position_hiring_organization_name', true);

  2. You now can create your HTML
    $job_logo = '<img src="' . $cie_logo . '" alt="' . $cie_name . '">';

  3. Finally just add your $job_logo somewhere in the $out already displayed
    $out .= $job_logo

Hope it can help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants