Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    Thread Starter Danstah

    (@danstah)

    So for me – a non-developer – is there a way to add a small image from the actual Job, without writing code?

    Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    You need to add code to that template file. Look at the other template files to see how. Its 1 line.

    Thread Starter Danstah

    (@danstah)

    I’ve been looking at the other files and trying out for a few hours now, but I honestly haven’t gotten close to anything that essembles a goodlooking thumnail. I have added the content-widget-job_listing.php to Child theme folder.

    Would you mind giving me a code snippet I could use for the added thumbnail?

    This is the code I am using:

    <li <?php job_listing_class(); ?>>
    	<a href="<?php the_job_permalink(); ?>">
    		<div class="position">
    			<h3><?php the_title(); ?></h3>
    		</div>
    		<ul class="meta">
    			<li class="location"><?php the_job_location( false ); ?></li>
    			<li class="company"><?php the_company_name(); ?></li>
    			<li class="job-type <?php echo get_the_job_type() ? sanitize_title( get_the_job_type()->slug ) : ''; ?>"><?php the_job_type(); ?></li>
    		</ul>
    	</a>
    </li>
    Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    This line outputs the thumbnail: https://github.com/Automattic/WP-Job-Manager/blob/master/templates/content-job_listing.php#L4

    Add that to the widget file ??

    Thread Starter Danstah

    (@danstah)

    I feel a little useless, as I’ve tried countless hours to insert it, but the image keeps overlapping the title and remaining text. I tried searching for code for the similar widget from PetSitter newest post and change that one to Jobs instead, but I have not had any luck. Here’s a screenshot of how it is now, and on the right, how I would very much like the image to be similar.

    This is the code I used:

    <li <?php job_listing_class(); ?>>
    	<a href="<?php the_job_permalink(); ?>">
    	<?php the_company_logo(); ?>
    		<div class="position">
    			<h3><?php the_title(); ?></h3>
    		</div>
    		<ul class="meta">
    			<li class="location"><?php the_job_location( false ); ?></li>
    			<li class="company"><?php the_company_name(); ?></li>
    			<li class="job-type <?php echo get_the_job_type() ? sanitize_title( get_the_job_type()->slug ) : ''; ?>"><?php the_job_type(); ?></li>
    		</ul>
    	</a>
    </li>

    Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    If the logo is there thats good. You will however need to style the output with some CSS if there is some overlap. Not sure if the theme author helps with this but may be worth a try. You can add styles to the theme stylesheet or using a plugin such as the CSS plugin that comes with jetpack.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Featured Jobs widget with image’ is closed to new replies.