9 - Managing Custom Fields Visibility

Once you have setup your core listing pages and have configured custom fields properly, now you may feel the need to conditionally display (or hide) custom fields for different users.

To achieve this functionality, the theme comes with optimized support for "WP Job Manager - Visibility" (by myles) plugin. Which allows you to show/hide custom fields based on a define criteria.

A popular use-case for this functionality is when you don't want candidates (or non-logged in users) to see sensitive fields in a job listing e.g. salary field, and require them to at-least create a free account on your site or buy some paid package* to see the hidden field(s).

*For the packages, you can use both "WC Paid Listing" or "WP Job Manager - Packages" plugins.

Setting Up Visibility Groups

Before telling the plugin which custom field to hide and display, we first have to define at-least one "Visibility Group" for which you can further configure different custom fields visibility.

In simple terms, visibility group is just a group of people who fulfill a given criteria. The criteria can have multiple parameters which includes user role, user packages etc.

You don't necessarily have to define these groups from scratch, because the plugin comes with some pre-defined visibility groups.

Some predefined visibility groups

Configuring Fields Visibility

Once you have defined at-least one visibility group, now you can configure different custom fields visibility for each visibility group.

Once you have finished configuring fields visibillity, the visitors who are not allowed to see a given field may see a view something like following:

Alternatively, you can also opt to hide the field altogether (including label, icon and placeholder) for non-relevant users by not defining a placeholder.