Author Archive

Tutorial: Changing the resume post_name/permalink

To make resume permalinks unique, the slug has a random string prepended. You can customise this via a filter and custom function added to your theme functions.php file. This code example below shows the code used:

add_filter( 'submit_resume_form_save_resume_data', 'custom_submit_resume_form_save_resume_data', 10, 5 );

function custom_submit_resume_form_save_resume_data( $data, $post_title, $post_content, $status, $values ) {
	// No random prefix - just use post title as the permalink/slug
	$data['post_name'] = sanitize_title( $post_title );
	
	// This line appends the location of the user
	$data['post_name'] .= '-' . sanitize_title( $values['resume_fields']['candidate_location'] );
	
	return $data;
}

Comment out the parts you don’t want appearing in your resume permalinks.

Email Notifications

Email Notifications

WP Job Manager Email Notifications are managed via Job Listings > Settings > Email Notifications

By default, an email will be sent to the site administrator when a job listing is submitted or updated via the front end (adding/updating jobs via the back end is not recommended).

From the Email Notification settings you are able to change the recipient for the emails and set the email format to either plain text or rich text. You can also disable them by unchecking the box next to each email notification.

The email notification settings for Expiring Job Notices also have the option to specify the number of days before expiry that the emails should be sent.

Third-Party Plugins and Advanced Customization

For more complex email solutions, you will need to use a third-party plugin. Here are a few recommendations:

  • The WP Job Manager Emails plugin provides native support and includes email templates
  • The Post Status Notifier sets up notifications when the status of a job listing changes
  • Or, if you feel comfortable with editing code, you can add custom code to send notification emails

Our add-ons may also send notifications:

  • Applications send a confirmation email to both employers and candidates
  • Job Alerts sends emails to candidates
  • Resume Manager will email new resume submissions to the administrator if enabled
  • WC Paid Listings does not send emails; WooCommerce does depending on your settings

Email Templates

Template files handle WP Job Manager email notifications. You can override the email templates by copying them to your theme and making edits there, for example: Copy from wp-job-manager/templates/emails/employer-expiring-job.php to yourtheme/job_manager/emails/employer-expiring-job.php

Troubleshooting

Emails are not sent

WP Job Manager uses the wp_mail() function – a core WordPress function – to send emails. If emails aren’t being sent/received, the issue relates to your web host’s core email function, not WP Job Manager.

With Resume add-on, Application Email notifications are not sent

If you have both Applications and Resume add-ons and force applicants to apply with a resume, applications process through Resume Manager, not Applications. Configure candidates to apply with the Applications form by disabling the Force Apply with Resume option under Resumes > Settings > Apply With Resume.

Tutorial: Remove the Resume Preview Step

Note: All code examples on this site are provided for developer reference/guidance only and we cannot guarantee that they will always work as expected. Our support policy does not include assistance with modifying or debugging code from any code examples, and they may be changed or removed if we find they no longer work due to changes in our plugins.

To remove the Preview step during the resume submission process, add the following code to a plugin like Code Snippets:

/**
 * Remove the preview step when submitting resumes.
 * @param  array $steps
 * @return array
 */
add_filter( 'submit_resume_steps', function( $steps ) {
	unset( $steps['preview'] );
	return $steps;
} );

/**
 * Change button text.
 */
add_filter( 'submit_resume_form_submit_button_text', function() {
	return __( 'Submit Resume', 'wp-job-manager-resumes' );
} );

/**
 * Since we removed the preview step and it's handler, we need to manually publish resumes.
 * @param  int $resume_id
 */
add_action( 'resume_manager_update_resume_data', function( $resume_id ) {
	$resume = get_post( $resume_id );
	if ( in_array( $resume->post_status, array( 'preview', 'expired' ), true ) ) {
		delete_post_meta( $resume->ID, '_resume_expires' );
		$update_resume                  = array();
		$update_resume['ID']            = $resume->ID;
		$update_resume['post_status']   = get_option( 'resume_manager_submission_requires_approval' ) ? 'pending' : 'publish';
		$update_resume['post_date']     = current_time( 'mysql' );
		$update_resume['post_date_gmt'] = current_time( 'mysql', 1 );
		wp_update_post( $update_resume );
	}
} );

Basically this does a few things:

  1. Remove the preview step
  2. Change preview text to Submit Resume
  3. Manually publish resume (as the preview handler normally does this)

Google Indexing API for WP Job Manager

Google Indexing API for WP Job Manager

A must-have add-on to make sure your jobs are listed first on Google Jobs! This Plugin provides the connection between WP Job Manager and the Google Indexing API.

The Google Indexing API allows site owners to directly notify Google when pages are added or removed. This enables rapid indexing of job listings for Google for Jobs, ensuring your positions appear in search results quickly.

For setup instructions and documentation, visit the WP Job Manager documentation site.

WP Job Manager core plugin snippets

Job Fields

Prefill the company logo field

add_filter('submit_job_form_fields', 'dm_prefill_company_logo');
function dm_prefill_company_logo( $fields ) {
  $fields['company']['company_logo']['value'] = 'full_url_to_the_logo';
  return $fields;
}

Mandatory fields

add_filter( 'submit_job_form_fields', 'custom_submit_job_form_fields' , 11);
function custom_submit_job_form_fields( $fields ) {
    $fields['job']['job_location']['required'] = true;
    $fields['job']['job_tags']['required'] = true;
    return $fields;
}

Prefill application email

add_filter('submit_job_form_fields_get_user_data', 'aas_prefill_application_field');
function aas_prefill_application_field( $fields ) {
  $fields['job']['application']['value'] = '[email protected]';
  return $fields;
}

Remove a field from the job submission page

add_filter( 'submit_job_form_fields', 'custom_submit_job_form_fields_dm' );
function custom_submit_job_form_fields_dm( $fields ) {
    unset($fields['job']['job_tags']);
    return $fields;
}

Remove all company details from the job submission page

add_filter( 'submit_job_form_fields', 'gma_custom_submit_job_form_fields' );
function gma_custom_submit_job_form_fields( $fields ) {
    unset($fields['company']['company_name']);
    unset($fields['company']['company_website']);
    unset($fields['company']['company_tagline']);
    unset($fields['company']['company_video']);
    unset($fields['company']['company_twitter']);
    unset($fields['company']['company_logo']);
    return $fields;
}

Change the default Job Type

add_filter( 'submit_job_form_fields', 'submit_job_form_fields_job_type_default' , 11);
function submit_job_form_fields_job_type_default( $fields ) {
    $fields['job']['job_type']['default'] = 'volunteer';
    return $fields;
}

Prefill the Locations field

add_filter('submit_job_form_fields', 'bk_prefill_jobs_location');
function bk_prefill_jobs_location( $fields ) {
  $fields['job']['job_location']['value'] = 'Granite Falls, WA';
  return $fields;
}

Redirects

Use alternative login page

add_filter( 'login_url', 'my_login_page', 10, 2 );
function my_login_page( $login_url, $redirect ) {
    return home_url( '/my-custom-login-page/?redirect_to=' . $redirect );
}

Redirect to Job Dashboard after job submission

add_filter( 'job_manager_job_submitted', function() {
    if ( wp_redirect( job_manager_get_permalink( 'job_dashboard' ) ) ) {
	    exit;
	  }
}, 20 );

Job Listings

Sort using custom field

function change_listing_args( $query_args ) {
	if ( ! empty( $query_args['orderby']['menu_order'] ) ) {
		$query_args['meta_key'] = '';
		$query_args['orderby']  = array_merge(
			array_splice( $query_args['orderby'], 0, 1 ),
			[ 'meta_value_num' => 'ASC' ],
			$query_args['orderby']
		);
	}
	return $query_args;
}
add_filter( 'get_job_listings_query_args', 'change_listing_args' );

Disable Job Schema

add_filter( 'wpjm_output_job_listing_structured_data', '__return_false' );

Enable excerpts in Job Listing descriptions

function add_excerpt_support_for_jobs() {
 add_post_type_support( 'job_listing', 'excerpt' );
}
add_action( 'init', 'add_excerpt_support_for_jobs' );

Search

Make custom meta field searchable

function my_wpjm_meta_key_dm() {
    global $wpdb, $job_manager_keyword;
    $searchable_meta_keys[] = '_my_meta_field';
    return $searchable_meta_keys;
}
add_filter('job_listing_searchable_meta_keys', 'my_wpjm_meta_key_dm');

WP Admin

Remove “Listing Expires” column from Job Dashboard

add_filter( 'job_manager_job_dashboard_columns', 'remove_expires_column' ); 
function remove_expires_column( $columns ) {
    unset( $columns['expires'] );
    return $columns;
}

Geocoding / Geolocation

Disable Geolocation

add_filter( 'job_manager_geolocation_enabled', '__return_false' );

Other

Enable comments on job listings

add_filter( 'register_post_type_job_listing', 'register_post_type_job_listing_enable_comments' );
function register_post_type_job_listing_enable_comments( $post_type ) {
	$post_type['supports'][] = 'comments';
	return $post_type;
}

Tutorial: Changing the job slug/permalink

Changing the job slug/permalink

Job listings in WP Job Manager default to the permalink ‘jobs’. For example, a job may have the URL: http://yoursite.com/jobs/job-listing-title

Important: After changing the slug, resave your permalinks. Go to Settings > Permalinks and click save.

Changing the permalink base using filters

Add custom code to your theme’s functions.php to filter the permalink. For example, change ‘jobs’ to ‘careers’:

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

Changing the permalink slug for new jobs

Customize job permalinks using filters in your theme’s functions.php:

add_filter( 'submit_job_form_prefix_post_name_with_company', '__return_false' );
add_filter( 'submit_job_form_prefix_post_name_with_location', '__return_false' );
add_filter( 'submit_job_form_prefix_post_name_with_job_type', '__return_false' );

Additional Examples

The document provides several advanced examples including appending the Job ID, adding the category to the base URL, and adding both category and region to the URL structure, plus instructions for changing job category and job type slugs.

Applications: Customising Application Statuses

Applications by default has the following statuses (these are custom post type statuses):

  1. New
  2. Interviewed
  3. Offer Extended
  4. Hired
  5. Archived
  6. Rejected

From version 1.7.0+ these statuses can be customised by using the filter job_application_statuses.

Adding a Status Example

This example adds a new status called ‘Example’. The code would be placed in your theme functions.php file or a custom plugin.

add_filter( 'job_application_statuses', 'add_new_job_application_status' );

function add_new_job_application_status( $statuses ) {
	$statuses['example'] = _x( 'Example', 'job_application', 'wp-job-manager-applications' );
	$statuses['another_example'] = _x( 'Another Example', 'job_application', 'wp-job-manager-applications' );
	$statuses['a_third_example'] = _x( 'A Third Example', 'job_application', 'wp-job-manager-applications' );
	return $statuses;
}

Removing a Status Example

This example removes the ‘offer extended’ status.

add_filter( 'job_application_statuses', 'add_new_job_application_status' );

function add_new_job_application_status( $statuses ) {
	unset( $statuses['offer'] );
	return $statuses;
}

Job Tags

Overview

Using the Job Tags plugin you can add a new ‘job tags’ field to the submit process, show jobs filtered by tag via shortcodes, and add tag filtering to the standard jobs shortcode.

Installation

To install this plugin, please refer to the guide here: https://wordpress.org/support/article/managing-plugins/#installing-plugins

Setup

After installation, head over to Job Listings > Settings to configure the plugin.

  • Job Listings > Enable Tag Archives – Enabling tag archives will make job tags link through to an archive of all jobs with said tag.
  • Job Submission > Maximum Job Tags – Enter a number to limit the amount of tags users can define when submitting a job.
  • Job Submission > Tag Input – Choose from Text Box, Multiselect, or Checkboxes for tag input method.

Modifications to the Job Submission Flow

This plugin adds a ‘Job Tags’ field to the Job Submission Process. Tags of 3 characters or fewer are forced to uppercase as abbreviations. Other tags become lowercase to prevent duplicates.

Tag Display

Job tags appear after the job description and are only linked if tag archives are enabled.

Tag Filters

The standard [jobs] shortcode is automatically enhanced with a tag filter section when at least one tag is assigned to a listing. Disable this by adding ‘show_tags=false’ to the shortcode.

The Tag Cloud Shortcode

Use the [job_tag_cloud] shortcode to display job tags. Tags are only linked when tag archives are enabled. Example: [job_tag_cloud orderby="count" number="10"]

The Jobs by Tag Shortcode

The [jobs_by_tag] shortcode outputs jobs matching specific tags. Accepts parameters like per_page, orderby, order, tag, and tags. Examples: [jobs_by_tag per_page="10" tag="your-tag"] or [jobs_by_tag per_page="10" tags="tag-1,tag-2"]

Editing User-Submitted Tags on an Existing Job

A known issue exists where the Job Tags block doesn’t display properly in the WordPress block editor. The workaround is to install the Classic Editor plugin to revert to the legacy editor.

Tutorial: Adding a new text field for jobs

Tutorial: Adding a new text field for jobs

Note: All code examples are provided for developer reference only. Support does not include debugging code examples.

This tutorial demonstrates how to add a custom field to job submissions and display it on single job listings. For a no-code solution, consider the Field Editor add-on.

Add the field to the frontend

In your theme’s functions.php or a functionality plugin, hook into the submission form:

add_filter( 'submit_job_form_fields', 'frontend_add_benefits_field' );

Then create the function:

function frontend_add_benefits_field( $fields ) {
  $fields['job']['job_benefits'] = array(
    'label'       => __( 'Benefits', 'job_manager' ),
    'type'        => 'text',
    'required'    => true,
    'placeholder' => 'e.g. 401k, health insurance, company car',
    'priority'    => 7
  );
  return $fields;
}

This adds a required benefits text field with priority 7 positioning.

Add the field to admin

Hook into the admin fields filter:

add_filter( 'job_manager_job_listing_data_fields', 'admin_add_benefits_field' );

Then write the function:

function admin_add_benefits_field( $fields ) {
  $fields['_job_benefits'] = array(
    'label'       => __( 'Benefits', 'job_manager' ),
    'type'        => 'text',
    'placeholder' => 'e.g. 401k, health insurance, company car',
    'description' => ''
  );
  return $fields;
}

Note the underscore prefix on the field name; this creates hidden meta automatically.

Display “Benefits” on the single job page

Use an action hook to display the field:

add_action( 'single_job_listing_meta_end', 'display_job_benefits_data' );

Create the display function:

function display_job_benefits_data() {
  global $post;
  $benefits = get_post_meta( $post->ID, '_job_benefits', true );
  if ( $benefits ) {
    echo '
  • ' . __( 'Benefits: ' ) . esc_html( $benefits ) . '
  • '; } }

    Simple Paid Listings

    Overview

    Using the Simple Paid Listings plugin you can charge a single fee to list a job on your site using either Stripe or PayPal to collect the funds.

    Note that this plugin does not allow coupons, discounts, or anything other than a simple “pay $X for job listing”. For additional capabilities, consider using WooCommerce Paid Listings instead.

    Installation

    To install this plugin, please refer to the guide at: https://wordpress.org/support/article/managing-plugins/#installing-plugins

    Setup

    After installation, head over to Job Listings > Settings > Paid Listings to configure your paid listings and gateways:

    • Listing Cost – Enter the cost of new listings, excluding currency symbols (e.g., 9.99)
    • Currency Code – Enter your desired currency code (USD for US Dollars, GBP for British Pounds Sterling)
    • Payment Gateway – Choose either Stripe Checkout or PayPal Standard

    Stripe Checkout Settings

    • Secret Key – Obtain from Stripe; test mode requires keys prepended with sk_test_
    • Publishable Key – Obtain from Stripe; test mode requires keys prepended with pk_test_

    PayPal Standard Configuration

    • PayPal Email – Your seller’s PayPal email address
    • PayPal Identity Token – Optional but recommended for Payment Data Transfer verification
    • PayPal Sandbox – Enable for testing without live payments

    Job Submission Flow

    The submission process is identical up to the preview page. On preview, the confirm button changes to “Pay for Listing”.

    With Stripe Checkout

    Clicking “Pay for Listing” opens the payment page. Upon successful payment, the job is marked paid and goes live or awaits approval based on your settings.

    With PayPal Standard

    Users are redirected to PayPal’s site for payment. After completion, they return to the job submission page.

    Security/HTTPS

    When using Stripe Checkout, set your Job Submission page to HTTPS.

    Troubleshooting

    Do not use Simple Paid Listings simultaneously with WooCommerce Paid Listings, as this causes unexpected behavior.