Author Archive

Fixing regions filter on Resumes page

If you are using plugin Regions for WP Job Manager you’ll notice the Region filter doesn’t work on Resumes page. For some reason the functionality exists but is not enabled for resumes, (please note this is 3rd party plugin, not our code)
To fix it you need to go to Plugins -> Plugin Editor, find on list in “Select plugin to edit” the “Regions for WP Job Manager“, it will automatically open first file to edit which is wp-job-manager-locations.php, scroll down to line 92:

 

you’ll see lines we have to uncomment, all you need to do is to remove the // from the beginning of each line.

After that save the changes and it will work.

 

How to solve problems with AJAX login?

If you’re trying to use Ajax login on Listeo and you get stuck on message ‘Sending user info, please wait…‘, first check if you have any cache/optimizations plugins active on your site. If you do, try to disable them to see if that help. If it does, you might need to change some settings in those plugins as they might have to aggressive optimization for this feature to work.

The issue is often connected with custom mod_security rules. Some hosting providers block login requests from non standard paths, so try to contact your hosting provider and ask them about it.

And last but not least, you may experience this issue on nginx server, in that case, add the following lines to /etc/nginx/nginx.conf

fastcgi_temp_file_write_size 10m;
fastcgi_busy_buffers_size 512k;
fastcgi_buffer_size 512k;
fastcgi_buffers 16 512k;
client_max_body_size 50m;
proxy_buffer_size 16k;
proxy_busy_buffers_size 16k;

if that won’t help, check if you have Nginx Content caching enabled, you might need to disable that to fix that problem

Editing Job Submission Fields

There are three main ways to customise the fields in WP Job Manager;

  1. For simple text changes, using a localisation file or a plugin such as the Say What Plugin. See Translating WP Job Manager for more information.
  2. Use a 3rd party plugin such as https://plugins.smyl.es/wp-job-manager-field-editor/ which has a UI for field editing.
  3. Use the WordPress hooks (filters) which are explained below.

WP Job Manager’s approach to allowing customisation of it’s forms is to use filters. In WordPress, filters essentially allow you to ‘filter’ data through your own custom php functions which return a different ‘filtered’ result. Any custom code can go in your theme functions.php file.


Editing fields on the frontend

Editing job submission fields is possible via the submit_job_form_fields filter. Adding some code will allow you to edit various fields, or add new ones.

See the below example which demonstrates how to change a field’s label:

// Add your own function to filter the fields
add_filter( 'submit_job_form_fields', 'custom_submit_job_form_fields' );

// This is your function which takes the fields, modifies them, and returns them
// You can see the fields which can be changed here: https://github.com/mikejolley/WP-Job-Manager/blob/master/includes/forms/class-wp-job-manager-form-submit-job.php
function custom_submit_job_form_fields( $fields ) {

// Here we target one of the job fields (job_title) and change it's label
 $fields['job']['job_title']['label'] = "Custom Label";

// And return the modified fields
 return $fields;
}

View the full list of core fields in this file: https://github.com/mikejolley/WP-Job-Manager/blob/master/includes/forms/class-wp-job-manager-form-submit-job.php


Editing fields in admin

Fields in admin are of similar structure and can be edited using the ‘job_manager_job_listing_data_fields’ filter. Each field takes a label, placeholder, type and description arguments.

See the below example which demonstrates how to change a field’s placeholder:
 // Add your own function to filter the fields
 add_filter( 'job_manager_job_listing_data_fields', 'custom_job_manager_job_listing_data_fields' );

// This is your function which takes the fields, modifies them, and returns them
 // You can see the fields which can be changed here: https://github.com/mikejolley/WP-Job-Manager/blob/master/includes/admin/class-wp-job-manager-writepanels.php
 function custom_job_manager_job_listing_data_fields( $fields ) {

// Here we target one of the job fields (location) and change it's placeholder
 $fields['_job_location']['placeholder'] = "Custom placeholder";

// And return the modified fields
 return $fields;
 }

View the full list of core fields in this file: https://github.com/mikejolley/WP-Job-Manager/blob/master/includes/admin/class-wp-job-manager-writepanels.php

Customizing Dashboard Menu

WorkScout offers a front-end dashboard for user, where they can manage their jobs, resume, messages and profile info.

The dashboard page has sidebar menu that helps navigate, some elements in that menu are automatically created based on settings in WPJM, so for example if you have set Submit Job page in the Job Listings 🠖 Settings 🠖 Pages, theme will automatically link that page in Dashboard Page menu for Employer.

However, you can assign your own links to Candidate/Employer menu.
Go to Appearance 🠖 Menus you can create there a new menu, and assign that menu to the one of dashboard locations, this could be Employer Dashboard Menu or Candidate Dashboard Menu.

Radius Search

How it works? If someone types keyword/location field, and  select a distance value, the address will be geocoded to latitude and longitude and all properties that are in the selected radius of that point are returned in search results.

If you want to enable Radius Search in your theme, you need to create another Google Maps API Key without any key or domain restrictions. This key will be used on server side geocoding and it won’t be public.

How to get Google API Key?

Once you created new API Key, paste it to WorkScout Core → Map Settings → Gooogle Maps API key for server side geocoding

 

How does search by location works?

There are two ways the ‘location’ field in search can work. The presence of Google Maps API key for server side geocoding in WorkScout Core – Map Options determines which one is used.

If the API key is added (and configured properly – please refer to this article) the address typed in ‘location’ field is geocoded to latitude and longitude and all jobs that are in the selected radius of that point are returned in search results. The radius  value can be set by default in WorkScout Core options (it’s 20km by default).

The search function creates a debug file named geocode.txt in your wp-content folder – if you think the geolocation doesn’t work or results are incorrect, please first check this file for any messages from API

If there’s no API key added the search is strictly text based, the text typed by user is compared to the jobs address field to find matching results.

Customizing Templates

Workscout Core has separated folder for all the templates that are used to display single listings and listings archives. Those templates  files can be overridden via your theme if you want to customise them. To override a template, move it to yourtheme/workscout-core/, keeping the path within ‘templates’ intact.

So for example, you’d like to change the registration form. To do that, copy file wp-content/plugins/workscout-core/templates/account/registration-form.php to wp-content/themes/yourtheme/workscout-core/account/registration-form.php and you can customise the file as you need. It will be used instead of the core template file. This also supports child themes, so you can put that file directly to your child theme.

Please note, if these files are updated in the core plugin, you may need to update your custom version in the future to maintain compatibility. Therefore it is advised to only override the template files you need to customise.

User Login / Registration

All registration options are simplified and you’ll find them in WorkScout Core → Registration Options. You can also set up recaptcha there.

Also don’t forget to enable registration in  Settings → General → Membership → Anyone can register.

Related article: How to enable social login?

How to speed up your website? 🚀

In this article, we will share the most useful WordPress speed optimization tips to boost WordPress performance and speed up your website.

Results achieved with WP Rocket caching plugin and Rocket.net hosting


The Basics

  1. Decent hosting
    No matter how much effort you put into optimizing your website, most of its success depends on the quality of your hosting. Even with a high-end VPS  your WordPress site might still not be as fast as you’d expect because website speed depends on several factors beyond just server resources.
    We recommend Rocket.net or Cloudways for resource demanding websites
  2. Caching plugin + lazy loading images.
    Free performance plugins you might try: WP Optimize or LiteSpeed Cache + Lazy Load
    Performance plugin that we tested and recommend: WP Rocket
  3. Cloudflare is a must-have; reducing load times by delivering cached content from servers closest to the user
  4. Don’t fix yourself on Google Page Speed Insights. The Google PageSpeed Insights score isn’t always a real reflection of a website’s actual speed because it mainly evaluates theoretical performance based on a set of lab metrics, not real-world user experience.
    Instead check your website performance at GTmetrix.com or SpeedVitals.com

WP Rocket Recommended Settings

  1. File Optimization
    ✅ Minify CSS files
    🟨 Optimize CSS delivery (if you notice any errors on your website after having activated this setting you should deactivate it as gains are not worth having visual glitches)
    ✅ Minify JavaScript Files
    ✅ Combine JavaScript files (make sure JavaScript still works properly afterward)
    🟨 Load JavaScript deferred (you can test however in some cases could cause issues with scripts)
  2. Media
    ✅ Enable LazyLoad for images
    ✅ Enable LazyLoad for CSS background images
    ✅ Enable LazyLoad for iframes and videos
    ✅ Add missing image dimensions
  3. Preload
    ✅ Activate Preloading
    🟨 Enable link preloading (you can enable it but this could be demanding on server because it downloads a page each time when a user hovers over the link)
  4. Advanced Rules
    ✅ Cache Lifespan set to 10 hours (or less if you experience issues with logging in via popup, if it still happens from time to time we suggest enabling “Skip additional login/registration security check” option in WorkScout Core → Registration)
  5. Database
    You can use every feature there to keep database clean
  6. CDN 
    Not needed if your hosting already has CDN.
  7. Hearbeat
    ✅Control hearbeat and set to “reduce activity”
  8. Image Optimization
    ✅
    You can use Imagify from WP Rocket or EWW Image Optimizer

WP Rocket works with all hosting providers however, certain hosts (like SiteGround – you should disable File-Based Caching in their plugin) include their own caching plugins and you’ll need to adjust these built-in caching settings for optimal compatibility with WP Rocket.


Advanced Tweaks

If you want to get the most out of your website in terms of speed, we highly recommend carefully reading this article:

Speed Up Your Slow WordPress Site In 21 Steps: The Only Tutorial You Need To Pass Core Web Vitals Totally Revamped For 2024

WooCommerce Paid Listings

WooCommerce Paid Listings is a plugin for WP Job Manager which lets you purchase Job Listing Packages and Resume Packages (as products) which are then used to post listings.

Setting up WooCommerce products as job/resume packages

After installation the first thing you’ll need to do is setup some products in WooCommerce which job submitters can purchase.

  1. Create a new product
  2. Select a package product type:
    1. Job Package – A package which lets a user post X jobs before expiring.
    2. Resume Package – A package which lets a user post X resumes before expiring. Requires Resume Manager add-on.
    3. Job Package Subscription – Requires WooCommerce Subscriptions. See below for more information.
    4. Resume Package Subscription – Requires WooCommerce Subscriptions and Resume Manager add-on. See below for more information.
  3. Enter price and other product details like any other product. Job/Resume Package products can be free or paid – your choice!
  4. Package specific options are as follows:

    • Listing limit – How many job or resume listings this package lets you create once purchased. Can be left blank for unlimited posting.
    • Listing duration – How long job/resume listings last (in days) before expiring when using this package.
    • Feature listings? – Whether or not job listings should be featured when using this package.
  5. Publish the product

The published package will then be available during job submission.


Subscriptions Support

Job Packages can also be subscriptions, but this requires the WooCommerce Subscriptions extension from WooThemes. You can have both Job and Resume Subscription packages.

Subscriptions can work in two ways.

  1. Package linked to the Subscription: If the subscription is linked to the listing, the user will be able to post a limit of X active listings which will expire when the subscription expires. Failure to renew will expire the listings.
  2. Subscription linked to the Listing: If the subscription is linked to the listing, the user will be able to post a limit of X active listings which will expire when the subscription expires. Failure to renew will expire the listings.

Job Submission Flow

WC Paid Listings will change the job submission process slightly to add the required purchase/job pack steps. This is how it should happen:

  1. User fills in the job submission form as normal
  2. User previews the job as normal
  3. Then he choose a package screen will be displayed. This page lists all Job Package products and previously purchased active job packs:
  4. User chooses a package and clicks submit.
    If this is a new package, it will be added to the WooCommerce cart, referencing the Job ID. Once paid for, the job will be approved and the package assigned to the user.
    If this is a package that has already been purchased, the job will be submitted right away.

The same flow is used for resumes