Wordpress Shortcodes
Shortcodes in WordPress can be used as a simple way to include new functionality on your website. Shortcodes consist of two brackets [] with in between the name of the short code (like so [shortcode-name]).
The OTYS Plugin uses shortcodes to display new functionalities on your website. When the plugin has been activated, and a valid API key has been added a bunch of shortcodes are available to use.
How to use shortcodes?
Before you can use shortcodes you will have to activate the plugin and add a valid API key.
Shortcodes a are simple text snippets which can be placed anywhere the text editor on your website. WordPress will automatically replace the placed shortcode with the desired functionality.
Let's say we want to add a list of vacancies to our website. We could do the following:
Navigate to your WordPress admin panel
Navigate to the pages screen and click "Add new"
Set the page title for example to be "Vacancies"
In the textarea type [otys-vacancies-list]
Click "Preview" and choose "Preview in new tab"
You'll now see a list of vacancies. This list of vacancies are vacancies fetched from your OTYS environment using the API key.
If you see a message stating that there are no vacancies to be displayed this means that there are no vacancies published for the current used brand in OTYS.
Available shortcodes
Candidate login
Available from version 2.0.47
It is possible for existing candidates to login with their OTYS webuser account. To display a login form on your website you can use the shortcode [otys-candidate-login].
Settings
Make sure to set the settings correctly or your situation. Below you can see where to find these settings.
Navigate to the OTYS plugin settings page in your WordPress admin panel (OTYS -> Settings)
Open the tab 'Candidate authentication'
Make sure to read every setting on this page and choose the options which are applicable for your situation and read the explanation of each setting and make sure to follow the instructions.
Make sure to save the settings
Providing the user their password
When you want candidates to be able to login you can provide candidates their password when they apply for the first time. When the WordPress plugin is activated for the first time, a default document is created for new candidate applications. In English this document is called 'WordPress | New candidate application (default)'. In this document you can place «password» which gets automatically replaced with the automatic generated password for the candidate.
Login in OTYS as key user
Open the document module
Search for the document 'WordPress | New candidate applications' (or the equivalent in your current OTYS language)
Open the document and change the text to include «password». You can for example write. 'We have created an account for you. Your automatic generated password is: «password»"
Make sure to do a test application on your website to test if everything works.
If you have trouble during the setup, feel free to contact support by creating a support ticket. We’re happy to help!
Candidate logout
Available from version 2.0.47
Please make sure to also read about the candidate login shortcode before doing this.
It is possible for existing candidates to login with their OTYS web user account. Of course it can happen that candidates forget their password, therefore it is possible to setup a forgot password form using the [otys-candidates-forgot-password] shortcode.
Settings
Make sure to setup the settings regarding the forgot password.
Navigate to the OTYS plugin settings page in your WordPress admin panel (OTYS -> Settings)
Open the tab 'Candidate authentication'
Make sure to read every setting setting on this page and choose the options which are applicable for your situation and read the explanation of each setting and make sure to follow the instructions.
Make sure to save the settings
Vacancies GEO Search
It is possible to search on location based on postal code. The shortcode otys-vacancies-geo-search] will output a form where the user will be able to filter on vacancies based on postal code. The user will also be able to set the min and max range to search in. Alternatively, you can choose to show the user a country picker as well.
Attribute | Description | Example |
min | The minimum distance a candidate can search on in kilometers. Default: 5 | [otys-vacancies-geo-search min="10"] |
max | The maximum distance a candidate can search on in kilometers. Default: 50 | [otys-vacancies-geo-search max="100"] |
default | The default distance a set when a candidate has not searched yet. Default: 30 | [otys-vacancies-geo-search default="20"] |
country | The country a user searches in. Use the country code to define another country. Default: NL | [otys-vacancies-geo-search country="EN"] |
countryselect | When this setting is enabled the user gets shown a dropdown in which the user can select the country to search in. Default: false | [otys-vacancies-geo-search countryselect="true"] |
steps | The steps defines the amount of distance that get added each time the user drags the distance slider. Default: 5 | [otys-vacancies-geo-search steps="1"] |
Job alert
It's now possible to use the [otys-jobalert] shortcode to output a job alert form where candidates can subscribe to receive email notifications of job offers which are applicable to the selected search criteria.
Before you can use the [otys-jobalert] shortcode you need to configure the confirmation mail and criteria in the plugin settings. the setup is as follows:
login as a WordPress admin on your WordPress website,
Navigate in the menu to OTYS -> Job alert
At the confirmation email setting please choose the corresponding document for the job alert. A document has automatically been created by the plugin
Choose which criteria the candidate must select. At least one criterion must be selected by the candidate to be able to create a job alert.
Open application
It's possible to show a open application form anywhere you like. When using the [otys-vacancies-apply] shortcode, a form will appear. This form is based on the "Open application" questionset in OTYS. (How to edit questionset can be found on our OTYS Go FAQ https://faq.otys.nl/?faq=Rrp5vClJX6).
From version 2.0.0 it's possible to show a questionset for a vacancy by adding the attribute vacancy-uid="VACANCY_UID" to the [otys-vacancies-apply] shortcode. This way you can show the vacancy application form on the vacancy detail page.
Attributes
Attribute | Description | Example | Plugin version |
redirect | The slug of the page to redirect to after a succesfull open application | [otys-vacancies-apply redirect="page-slug"] | 1.0.0 |
vacancy-uid | Show the application form for a specific vacancy. | [otys-vacancies-apply vacancy-uid="VACANCY_UID_HERE"] | 2.0.0 |
Search form
To filter on the output of the [otys-vacancies-list] you can use the [otys-vacancies-search] shortcode. This shortcode will output a search form which will enable you to filter on the [otys-vacancies-list] output with the criteria, category and keyword search.
Attributes
To change the output of the shortcode [otys-vacancies-list], you can add attributes. Listed below are the attributes available for the shortcode [otys-vacancies-list].
Attribute | Description | Example |
filters | Which filters to display as dropdown multiselects. | [otys-vacancies-search filters="region,hours-per-week"] |
keyword | Wheter to show keyword search. By default: true | [otys-vacancies-search keyword="false"] |
Vacancies selected filters
It is possible to filter on the vacancies which are outputted via the shortcode [otys-vacancies-list] using the output of the shortcode [otys-vacancies-filters].
The shortcode [otys-vacancies-filters] outputs a list of filters. Which filters are shown can be changed in the settings of the OTYS Plugin in the admin panel in the tab 'Vacancies'. OTYS > Settings > Vacancies > Vacancy .
When a filter is applied by a user this changes the output of the [otys-vacancies-list] shortcode. The shortcode [otys-vacancies-filters] requires the shortcode [otys-vacancies-list] to be on the same page.
When a filter attribute is added on the shortcode [otys-vacancies-list] that specific filter will not be shown in the output of the [otys-vacancies-filters], this way it's possible to create a prefiltered vacancy overview (or landingpage) without the user being able to filter away from the predefined filters.
Attribute | Description | Example |
show | From version 2.0.14 Show specific filters based on slugs. (Only filters enabled in the WordPress admin panel can be used) | [otys-vacancies-filters show="region"] [otys-vacancies-filters show="region,hours-per-week"] |
From version 2.0.20 If the shortcodes are not displayed via the_content() of WordPress, the shortcodes will not be able to automaticly communicate with eachother. To let the shortcodes still work in combination with eachother you'll have to use the same filter attributes on each shortcode. Which attributes you use for this can be seen in the documentation of the [otys-vacancies-list] shortcode.
Vacancies list
Use the shortcode [otys-vacancies-list]
Only published vacancies linked to the brand will be shown.
To output a list of vacancies you can use the shortcode [otys-vacancies-list].
Attributes
To change the output of the shortcode [otys-vacancies-list], you can add attributes. Listed below are the attributes available for the shortcode [otys-vacancies-list].
Attribute | Description | Example |
per page | Choose how many vacancies are displayed. Default: 10 | [otys-vacancies-list perpage="5"] |
relation | Show vacancies based on relation. The relation id can be found by navigating to your CRM and clicking the open new window button (the arrow in the right corner). The relation ID will be visible in the URL (a numeric value) | [otys-vacancies-list relation="xxxxxx"] |
Match criteria | It's possible to pre-filter on match criteria. To prefilter on match criteria you should add the match criteria name and option name as attribute to the shortcode. | [otys-vacancies-list region="utrecht"] [otys-vacancies-list region="utrecht,gelderland"] [otys-vacancies-list region="utrecht,gelderland" hours-per-week="24-hours"] |
category | It's possible to pre-filter on category. To prefilter on category you should add the category slug and category option name as attribute to the shortcode. | [otys-vacancies-list category="ict"] |
premium | It's possible to pre-filter on premium vacancies. To prefilter on premium vacancies you should add the premium slug to the shortcode with value true or false. True will show only premium vacancies and false will exclude all premium vacancies. | [otys-vacancies-list premium="true"] [otys-vacancies-list premium="false"] |
search | It's possible to use a predefined keyword search to create a landing page by specifying the search attribute | [otys-vacancies-list search="keyword"] |
Vacancy shortlist
Only published vacancies linked to the brand will be shown.
To output a shortlist of vacancies you can use the shortcode [otys-vacancies-shortlist]. A shortlist is a list of vacancies without pagination.
Attributes
To change the output of the shortcode [otys-vacancies-shortlist], you can add attributes. Listed below are the attributes available for the shortcode [otys-vacancies-list].
Attribute | Description | Example |
limit | Choose how many vacancies are displayed. Default: 10 | [otys-vacancies-shortlist limit="5"] |
owner | Show vacancies based on vacancy owner (consultant). | [otys-vacancies-shortlist owner="name@website.com"] |
relation | Show vacancies based on relation. The relation id can be found by navigating to your CRM and clicking the open new window button (the arrow in the right corner). The relation ID will be visible in the url (a numeric value) | [otys-vacancies-shortlist relation="xxxxxx"] |
Match criteria | It's possible to pre-filter on match criteria. To prefilter on match criteria you should add the match criteria name and option name as attribute to the shortcode. | [otys-vacancies-shortlist region="utrecht"] [otys-vacancies-shortlist region="utrecht,gelderland"] [otys-vacancies-shortlist region="utrecht,gelderland" hours-per-week="24-hours"] |
category | It's possible to pre-filter on category. To prefilter on category you should add the category slug and category option name as attribute to the shortcode. | [otys-vacancies-shortlist category="ict"] |
premium | It's possible to pre-filter on premium vacancies. To prefilter on premium vacancies you should add the premium slug to the shortcode with value true or false. True will show only premium vacancies and false will exclude all premium vacancies. | [otys-vacancies-shortlist premium="true"] [otys-vacancies-shortlist premium="false"] |
mode Available from version 2.0.23 | shortlist (default): Shows only vacancies which have publish in shortlist marked in OTYS. all: Shows all vacancies, the shortlist will not require the publish in shortlist checkbox to be marked in OTYS | [otys-vacancies-shortlist mode="all"] |
exclude Available from version 2.0.24 | Exclude a vacancy from the shortlist by uid | [otys-vacancies-shortlist exclude="VACANCY_UID"] |
search | It's possible to use a predefined keyword search to create a landingspage by specifying the search attribute | [otys-vacancies-list search="keyword"] |
Vacancy selected filters
It's possible to show all selected filters and an easy way to click away the selected filters using the shortcode [otys-vacancies-selected-filters].