Forum Replies Created

Viewing 15 replies - 31 through 45 (of 70 total)
  • Thanks for stepping in @mike. I can also only get it working when editing the file directly as you point out in your comment http://ww.wp.xz.cn/support/topic/correct-handling-of-jobs-vs-job-folders?replies=15#post-5780132.

    @amery currently not able to work on this today. Will look at it tomorrow. Thanks for your reply.

    Good to hear. You are welcome!

    @amery I agree with you that the slug structure can be improved. @mike it is also on my wishlist.

    Changing the job slug is fairly easy and the solution is already somewhere in the forum/documentation.

    Add this to your functions.php and change ‘jobs’ to fit your need.

    // Rewrite Job Slug
    add_filter( 'register_post_type_job_listing', 'change_job_listing_slug' );
    function change_job_listing_slug( $args ) {
    	$args['rewrite']['slug'] = _x( 'jobs', 'Job permalink - resave permalinks after changing this', 'job_manager' );
    	return $args;
    }

    And don’t forget to resave your permalinks after adding this!

    @colabora Please read the documentation carefully (see this link) . The first paragraph already gives you the answer: “Any custom code can go in your theme functions.php file.

    You can find the code for the search form in the file /templates/job-filters.php If you only want to show the categories you need to overwrite the template (see docs on how to do this) and replace the content of job-filters.php with the following

    <?php wp_enqueue_script( 'wp-job-manager-ajax-filters' ); ?>
    <form class="job_filters">
    	<?php do_action( 'job_manager_job_filters_start', $atts ); ?>
    
    	<div class="search_jobs">
    		<?php do_action( 'job_manager_job_filters_search_jobs_start', $atts ); ?>
    
    		<?php if ( $categories ) : ?>
    			<?php foreach ( $categories as $category ) : ?>
    				<input type="hidden" name="search_categories[]" value="<?php echo sanitize_title( $category ); ?>" />
    			<?php endforeach; ?>
    		<?php elseif ( $show_categories && ! is_tax( 'job_listing_category' ) && get_terms( 'job_listing_category' ) ) : ?>
    			<div class="search_categories">
    				<label for="search_categories"><?php _e( 'Category', 'wp-job-manager' ); ?></label>
    				<?php wp_dropdown_categories( array( 'taxonomy' => 'job_listing_category', 'hierarchical' => 1, 'show_option_all' => __( 'All Job Categories', 'wp-job-manager' ), 'name' => 'search_categories', 'orderby' => 'name', 'selected' => $selected_category ) ); ?>
    			</div>
    		<?php endif; ?>
    
    		<?php do_action( 'job_manager_job_filters_search_jobs_end', $atts ); ?>
    	</div>
    
    	<?php do_action( 'job_manager_job_filters_end', $atts ); ?>
    </form>

    The error message says that the file /includes/admin/class-wp-job-manager-writepanels.php is missing. This could have happened when your .zip of the plugin is corrupt.

    Can you confirm the file is present in that location?

    Add the following to your functions.php

    /* Create job maps */
     */
    	function the_job_map( $post = null ) {
    		$location = get_the_job_location( $post );
    
    		if ( $location ) {
    			echo apply_filters( 'the_job_location_map_link', '<a class="google_map_link" href="http://maps.google.com/maps?q=' . urlencode( $location ) . '&zoom=14&size=512x512&maptype=roadmap&sensor=false"><img class="google_map" src="http://maps.googleapis.com/maps/api/staticmap?center=' . urlencode( $location ) . '&markers=color:red%7C' . urlencode( $location ) . '&zoom=8&size=200x200&scale=2&maptype=roadmap&sensor=false"></a>', $location, $post );
    		}
    	}

    To display the map you can now use the following

    <?php the_job_map(); ?>

    If you want to tweak how the map looks you should focus on this part: ‘&zoom=14&size=512×512&maptype=roadmap&sensor=false’ Search Google how to customize the map some more.

    Edit: this will show an image (512px) of the map location. Why? Because I prefer an image instead of the whole interactive map. Especially with the small size of the map.

    Overwrite the job-application-email.php file and replace this default code

    <p><?php printf( __( 'To apply for this job <strong>email your details to</strong> <a class="job_application_email" href="mailto:%1$s%2$s">%1$s</a>', 'wp-job-manager' ), $apply->email, '?subject=' . rawurlencode( $apply->subject ) ); ?></p>
    
    <p>
    	<?php _e( 'Apply using webmail: ', 'wp-job-manager' ); ?>
    
    	<a href="https://mail.google.com/mail/?view=cm&fs=1&to=<?php echo $apply->email; ?>&su=<?php echo urlencode( $apply->subject ); ?>" target="_blank" class="job_application_email">Gmail</a> / 
    
    	<a href="http://webmail.aol.com/Mail/ComposeMessage.aspx?to=<?php echo $apply->email; ?>&subject=<?php echo urlencode( $apply->subject ); ?>" target="_blank" class="job_application_email">AOL</a> / 
    
    	<a href="http://compose.mail.yahoo.com/?to=<?php echo $apply->email; ?>&subject=<?php echo urlencode( $apply->subject ); ?>" target="_blank" class="job_application_email">Yahoo</a> / 
    
    	<a href="http://mail.live.com/mail/EditMessageLight.aspx?n=&to=<?php echo $apply->email; ?>&subject=<?php echo urlencode( $apply->subject ); ?>" target="_blank" class="job_application_email">Outlook</a>
    
    </p>

    with

    <p><?php printf( __( 'To apply for this job <strong>email your details to</strong> <a class="job_application_email" href="mailto:%1$s%2$s">%1$s</a>', 'wp-job-manager' ), $apply->email, '?subject=' . rawurlencode( $apply->subject ) ); ?></p>

    Overwriting template instructions can be found here https://wpjobmanager.com/document/template-overrides/

    Evert

    (@fourleafed)

    @olafnekeman the final code must be added as a new file in the root folder of your (child)theme. For instance call it ‘tpl-job-dashboard.php’.

    Next create the page and select the ‘Submit Job Form’ template (right hand side).

    Evert

    (@fourleafed)

    WordPress automatically compresses images, which could relate to the issue you are describing. You can prevent WordPress from doing this by adding the following to your functions.php

    add_filter( 'jpeg_quality', create_function( '', 'return 100;' ) );

    Don’t forget that not reducing the image size can increase the time your site takes to load (and make your site slow).

    Evert

    (@fourleafed)

    @apqc it is fairly simple and with the instruction given in this thread you should be able you to make the changes yourself.

    1. create a child theme
    2. read WP Job Manager documentation on overriding templates
    3. add the code from @mike described here to the file content-single-job_listing.php

    If you feel that the provided information and tips are not enough you should get in contact with someone who can do it for you.

    Cheers

    Evert

    (@fourleafed)

    @jan Coffee always helps 🙂 And you might want to try a Stroopwafel next time. They are delicious and combine well with coffee.

    Cheers!

    Evert

    (@fourleafed)

    @jan Understood. My apologies. Only trying to help others 🙂

Viewing 15 replies - 31 through 45 (of 70 total)