Viewing 10 replies - 1 through 10 (of 10 total)
  • @viesiissz
    Yes, you have to add a target=”_blank” attribute to the link. Line 22

    https://github.com/Automattic/WP-Job-Manager/blob/master/templates/content-job_listing.php#L22

    and then uplaod it to this directory on your server
    yourtheme/job_manager/content-job_listing.php

    Thread Starter viesiissz

    (@viesiissz)

    @braehler

    Hi!

    Yes but it’s overrride. When i will update plugin it’s will be missing.

    Thats why i need hook for child theme.

    @viesiissz
    just put the content-job_listing.php into this folder
    your_child_theme/job_manager/content-job_listing.php

    this is the normal way to override the template. And this keeps it upgrade safe

    Thread Starter viesiissz

    (@viesiissz)

    @braehler

    I insert like this :
    <a href="<?php the_job_permalink(); ?>" target="_blank">

    Not working. It’s not correct ?

    @viesiissz

    try this one here
    <a href="<?php the_job_permalink(); ?>" target="blank"></a>

    Thread Starter viesiissz

    (@viesiissz)

    @braehler

    It’s funny, but still not working ??

    @viesiissz
    strange, for me this one works.
    Would ypu please share the whole code here? And did you include the right directory for the override template?

    Thread Starter viesiissz

    (@viesiissz)

    @braehler

    Sure.

    <?php
    /**
     * Job listing in the loop.
     *
     * This template can be overridden by copying it to yourtheme/job_manager/content-job_listing.php.
     *
     * @see         https://wpjobmanager.com/document/template-overrides/
     * @author      Automattic
     * @package     wp-job-manager
     * @category    Template
     * @since       1.0.0
     * @version     1.34.0
     */
    
    if ( ! defined( 'ABSPATH' ) ) {
    	exit; // Exit if accessed directly.
    }
    
    global $post;
    ?>
    <li <?php job_listing_class(); ?> data-longitude="<?php echo esc_attr( $post->geolocation_long ); ?>" data-latitude="<?php echo esc_attr( $post->geolocation_lat ); ?>">
    	<a href="<?php the_job_permalink(); ?>" target="blank"></a>
    		<?php the_company_logo(); ?>
    		<div class="position">
    			<h3><?php wpjm_the_job_title(); ?></h3>
    			<div class="company">
    				<?php the_company_name( '<strong>', '</strong> ' ); ?>
    				<?php the_company_tagline( '<span class="tagline">', '</span>' ); ?>
    			</div>
    		</div>
    		<div class="location">
    			<?php the_job_location( false ); ?>
    		</div>
    		<ul class="meta">
    			<?php do_action( 'job_listing_meta_start' ); ?>
    
    			<?php if ( get_option( 'job_manager_enable_types' ) ) { ?>
    				<?php $types = wpjm_get_the_job_types(); ?>
    				<?php if ( ! empty( $types ) ) : foreach ( $types as $type ) : ?>
    					<li class="job-type <?php echo esc_attr( sanitize_title( $type->slug ) ); ?>"><?php echo esc_html( $type->name ); ?></li>
    				<?php endforeach; endif; ?>
    			<?php } ?>
    
    			<li class="date"><?php the_job_publish_date(); ?></li>
    
    			<?php do_action( 'job_listing_meta_end' ); ?>
    		</ul>
    	</a>
    </li>
    

    wp-job-manager – templates – content-job-listing.php

    @viesiissz
    mmh, I do not see anything wrong here.
    Is the path correct? you should upload to your childtheme.
    Maybe you can provide an URL and if possible share some admin logins.But please do not post them in this forum here

    Plugin Contributor Cena (a11n)

    (@cena)

    @viesiissz please do not share logins, and @braehler please don’t encourage people to do so, here or otherwise.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Jobs in new tab’ is closed to new replies.