Lock additional resume information

WPJobBoard allows hiding candidate contact information from e.g. non-registred user or employers without membership. By default, this option hides only two pieces of information: phone number and e-mail. In some cases, there is a need to hide additional (sometimes not related to contact) information.

To hide an additional field, you can add this short snippet into your functions.php file:

add_filter('wpjb_lock_resume', 'my_wpjb_lock_resume');
function my_wpjb_lock_resume($lock) {

    $lock[] = "field_name";
    return $lock;
}

Of course,  in place of “field_name”, you should put the acctual name of your field, that you provided in Visual Editor (wp-admin -> Settings (WPJB) -> Custom Fields).

If you need to, you can add many fields in this snippet.

add_filter('wpjb_lock_resume', 'my_wpjb_lock_resume');
function my_wpjb_lock_resume($lock) {

   $lock[] = "field_name_1";
   $lock[] = "field_name_2";
   return $lock; 
}

Example

Let’s assume that our privacy configuration for resumes, looks like on attached screenshot:

Example privacy configuration.

Example privacy configuration.

In our example resume, we should see something like this for not premium members:

Only two fields are locked by default.

But what in case, if we also want to hide website? First thing is to check name of our field. We can do it in wp-admin -> Settings (WPJB) -> Custom Fields -> My Resume Form. We need to find our website field and click “edit” button, in our case is a gearwheel icon. In a new tab, we should see the name of the field.

We are checking field name.

Our field name is “user_url”. Thanks to that information, we know now, that our snippet will look like this:

add_filter('wpjb_lock_resume', 'my_wpjb_lock_resume');
function my_wpjb_lock_resume($lock) {

   $lock[] = "user_url";
   return $lock; 
}

If we put this code into functions.php file, our resume in front-end should look like this:

All fields are locked.

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *