WP Job Portal Shortcodes

Below, you’ll find a detailed guide on how to add the WP Job Portal Shortcodes to your WordPress website, including their parameters, examples, and PHP function code. Additionally, we’ll assist you with common issues that might cause the WP Job Portal Plugin shortcodes not to show or not to work correctly.

Before starting, here is an overview of the WP Job Portal Plugin and the shortcodes it provides:

Plugin Icon
WP Job Portal – A Complete Job Board

"WP Job Portal is a comprehensive job board plugin for WordPress. It provides an all-in-one solution for managing job listings, applications, and employment features on your website."

★★★★✩ (12) Active Installs: 3000+ Tested with: 6.3.2 PHP Version: false
Included Shortcodes:
  • [wpjobportal_employer_controlpanel]
  • [wpjobportal_jobseeker_controlpanel]
  • [wpjobportal_job_search]
  • [wpjobportal_job]
  • [wpjobportal_job_categories]
  • [wpjobportal_job_types]
  • [wpjobportal_my_appliedjobs]
  • [wpjobportal_my_companies]
  • [wpjobportal_my_departments]
  • [wpjobportal_my_jobs]
  • [wpjobportal_my_resumes]
  • [wpjobportal_add_company]
  • [wpjobportal_add_department]
  • [wpjobportal_add_job]
  • [wpjobportal_add_resume]
  • [wpjobportal_employer_registration]
  • [wpjobportal_jobseeker_registration]
  • [wpjobportal_jobseeker_my_stats]
  • [wpjobportal_employer_my_stats]
  • [wpjobportal_login_page]
  • [wpjobportal_resumes]
  • [wpjobportal_companies]
  • [wpjobportal_searchjob]
  • [wpjobportal_searchresume]
  • [wpjobportal_jobbycategory]
  • [wpjobportal_jobbytypes]
  • [wpjobportal_jobstats]
  • [wpjobportal_jobsbycities]
  • [wpjobportal_jobsbystate]
  • [wpjobportal_jobsbycountries]
  • [wpjobportal_jobsonmap]

WP Job Portal [wpjobportal_employer_controlpanel] Shortcode

The WP Job Portal shortcode is used to display an employer control panel on a WordPress page. The shortcode executes the ‘show_employer_controlpanel’ function. This function sets up a control panel for employers, allowing them to manage job listings. If the site is offline, it shows an offline message. If the user is disabled, it displays a disabled message. The control panel includes several modules like ‘addcompany’, ‘mycompanies’, ‘adddepartment’, and more.

Shortcode: [wpjobportal_employer_controlpanel]

Parameters

Here is a list of all possible wpjobportal_employer_controlpanel shortcode parameters and attributes:

Based on the given code, the shortcode doesn’t have any explicit parameters that can be passed to it. Therefore, the answer is: NO_PARAMS.

Examples and Usage

Basic example – The shortcode displays the employer control panel with default parameters.

[wpjobportal_employer_controlpanel]

Advanced examples – In the advanced usage of the shortcode, we can pass different parameters to customize the output. Here are some examples:

Display the employer control panel with the module set to ‘addcompany’ and layout set to ‘mycompanies’.

[wpjobportal_employer_controlpanel wpjobportalme="addcompany" wpjobportallt="mycompanies"]

Use the shortcode to display the employer control panel with the module set to ‘addfolder’ and layout set to ‘myfolders’.

[wpjobportal_employer_controlpanel wpjobportalme="addfolder" wpjobportallt="myfolders"]

Display the employer control panel with the module set to ‘addjob’ and layout set to ‘myjobs’.

[wpjobportal_employer_controlpanel wpjobportalme="addjob" wpjobportallt="myjobs"]

PHP Function Code

In case you have difficulties debugging what causing issues with [wpjobportal_employer_controlpanel] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('wpjobportal_employer_controlpanel', array($this, 'show_employer_controlpanel'));

Shortcode PHP function:

function show_employer_controlpanel($raw_args, $content = null) {
        //default set of parameters for the front end shortcodes
        ob_start();
        $defaults = array(
            'wpjobportalme' => 'employer',
            'wpjobportallt' => 'controlpanel',
        );
        $sanitized_args = shortcode_atts($defaults, $raw_args);
        if(isset(wpjobportal::$_data['sanitized_args']) && !empty(wpjobportal::$_data['sanitized_args'])){
            wpjobportal::$_data['sanitized_args'] += $sanitized_args;
        }else{
            wpjobportal::$_data['sanitized_args'] = $sanitized_args;
        }
        $pageid = get_the_ID();
        wpjobportal::wpjobportal_setPageID($pageid);
        wpjobportal::wpjobportal_addStyleSheets();
        $offline = wpjobportal::$_config->getConfigurationByConfigName('offline');
        if ($offline == 1) {
            WPJOBPORTALlayout::getSystemOffline();
        } elseif (WPJOBPORTALincluder::getObjectClass('user')->isdisabled()) { // handling for the user disabled
            WPJOBPORTALlayout::getUserDisabledMsg();
        } else {
            $module = WPJOBPORTALrequest::getVar('wpjobportalme', null, 'employer');
            $layout = WPJOBPORTALrequest::getLayout('wpjobportallt', null, 'controlpanel');
            $employerarray = array('addcompany', 'mycompanies', 'adddepartment', 'mydepartments', 'addfolder', 'myfolders', 'addjob', 'myjobs');
            $isouruser = WPJOBPORTALincluder::getObjectClass('user')->isWPJOBPortalUser();
            $isguest = WPJOBPORTALincluder::getObjectClass('user')->isguest();
            if (in_array($layout, $employerarray) && $isouruser == false && $isguest == false) {
                WPJOBPORTALincluder::include_file('newinwpjobportal', 'common');
            } else {
                WPJOBPORTALincluder::include_file($module);
            }
        }
                unset(wpjobportal::$_data['sanitized_args']);
        $content .= ob_get_clean();
        return $content;
    }

Code file location:

wp-job-portal/wp-job-portal/includes/shortcodes.php

WP Job Portal [wpjobportal_jobseeker_controlpanel] Shortcode

The WP Job Portal shortcode is a functional tool that displays a control panel for job seekers. It sets parameters, checks if the site is offline, manages user accessibility, and determines the layout based on user status.

Shortcode: [wpjobportal_jobseeker_controlpanel]

Parameters

Here is a list of all possible wpjobportal_jobseeker_controlpanel shortcode parameters and attributes:

  • wpjobportalme – Specifies the module to be used, default is ‘jobseeker’
  • wpjobportallt – Defines the layout of the plugin, default is ‘controlpanel’

Examples and Usage

Basic example – Show the job seeker’s control panel by using the shortcode without any additional parameters.

[wpjobportal_jobseeker_controlpanel]

Advanced examples

Display the job seeker’s control panel with customized module and layout. The shortcode will first try to use the ‘wpjobportalme’ and ‘wpjobportallt’ parameters to customize the module and layout respectively. If these parameters are not found, it will default to ‘jobseeker’ and ‘controlpanel’.

[wpjobportal_jobseeker_controlpanel wpjobportalme="myresumes" wpjobportallt="controlpanel"]

Display the job seeker’s control panel with the ‘myappliedjobs’ module. The shortcode will use the ‘wpjobportalme’ parameter to customize the module. If this parameter is not found, it will default to ‘jobseeker’.

[wpjobportal_jobseeker_controlpanel wpjobportalme="myappliedjobs"]

Display the job seeker’s control panel with the ‘controlpanel’ layout. The shortcode will use the ‘wpjobportallt’ parameter to customize the layout. If this parameter is not found, it will default to ‘controlpanel’.

[wpjobportal_jobseeker_controlpanel wpjobportallt="controlpanel"]

PHP Function Code

In case you have difficulties debugging what causing issues with [wpjobportal_jobseeker_controlpanel] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('wpjobportal_jobseeker_controlpanel', array($this, 'show_jobseeker_controlpanel'));

Shortcode PHP function:

function show_jobseeker_controlpanel($raw_args, $content = null) {
        //default set of parameters for the front end shortcodes
        ob_start();
        $defaults = array(
            'wpjobportalme' => 'jobseeker',
            'wpjobportallt' => 'controlpanel',
        );
        $sanitized_args = shortcode_atts($defaults, $raw_args);
        if(isset(wpjobportal::$_data['sanitized_args']) && !empty(wpjobportal::$_data['sanitized_args'])){
            wpjobportal::$_data['sanitized_args'] += $sanitized_args;
        }else{
            wpjobportal::$_data['sanitized_args'] = $sanitized_args;
        }
        $pageid = get_the_ID();
        wpjobportal::wpjobportal_setPageID($pageid);
        wpjobportal::wpjobportal_addStyleSheets();
        $offline = wpjobportal::$_config->getConfigurationByConfigName('offline');
        if ($offline == 1) {
            WPJOBPORTALlayout::getSystemOffline();
        } elseif (WPJOBPORTALincluder::getObjectClass('user')->isdisabled()) { // handling for the user disabled
            WPJOBPORTALlayout::getUserDisabledMsg();
        } else {
            $module = WPJOBPORTALrequest::getVar('wpjobportalme', null, 'jobseeker');
            $layout = WPJOBPORTALrequest::getLayout('wpjobportallt', null, 'controlpanel');
            $jobseekerarray = array('myresumes','myappliedjobs');
            $isouruser = WPJOBPORTALincluder::getObjectClass('user')->isWPJOBPortalUser();
            $isguest = WPJOBPORTALincluder::getObjectClass('user')->isguest();
            if (in_array($layout, $jobseekerarray) && $isouruser == false && $isguest == false) {
                WPJOBPORTALincluder::include_file('newinwpjobportal', 'common');
            } else {
                WPJOBPORTALincluder::include_file($module);
            }
        }
        unset(wpjobportal::$_data['sanitized_args']);
        $content .= ob_get_clean();
        return $content;
    }

Code file location:

wp-job-portal/wp-job-portal/includes/shortcodes.php

WP Job Portal [wpjobportal_job_search] Shortcode

The WP Job Portal shortcode enables the job search functionality on your website. It generates a search box where users can look for jobs based on their preferences. This shortcode works by setting default parameters for the search function. It then sanitizes these parameters to ensure they are safe to use. It sets the page ID and adds necessary stylesheets for the search box. In case the system is offline or the user is disabled, it displays appropriate messages. Otherwise, it includes the necessary file for the job search module. Finally, it cleans up the buffered content and returns it to be displayed on the website.

Shortcode: [wpjobportal_job_search]

Examples and Usage

Basic example – Display a job search form on your website using the ‘wpjobportal_job_search’ shortcode without any additional parameters.

[wpjobportal_job_search /]

Advanced examples

Specify a different module for the job search feature by using the ‘wpjobportalme’ parameter. In this example, ‘advancedsearch’ is used as the module.

[wpjobportal_job_search wpjobportalme='advancedsearch' /]

Use the ‘wpjobportallt’ parameter to change the layout of the job search form. In this example, ‘compact’ is used as the layout type.

[wpjobportal_job_search wpjobportallt='compact' /]

Combine multiple parameters to customize the job search feature. In this example, ‘advancedsearch’ is used as the module and ‘compact’ as the layout type.

[wpjobportal_job_search wpjobportalme='advancedsearch' wpjobportallt='compact' /]

PHP Function Code

In case you have difficulties debugging what causing issues with [wpjobportal_job_search] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('wpjobportal_job_search', array($this, 'show_job_search'));

Shortcode PHP function:

function show_job_search($raw_args, $content = null) {
        //default set of parameters for the front end shortcodes
        ob_start();
        $defaults = array(
            'wpjobportalme' => 'jobsearch',
            'wpjobportallt' => 'jobsearch',
        );
        $sanitized_args = shortcode_atts($defaults, $raw_args);
        if(isset(wpjobportal::$_data['sanitized_args']) && !empty(wpjobportal::$_data['sanitized_args'])){
            wpjobportal::$_data['sanitized_args'] += $sanitized_args;
        }else{
            wpjobportal::$_data['sanitized_args'] = $sanitized_args;
        }
        $pageid = get_the_ID();
        wpjobportal::wpjobportal_setPageID($pageid);
        wpjobportal::wpjobportal_addStyleSheets();
        $offline = wpjobportal::$_config->getConfigurationByConfigName('offline');
        if ($offline == 1) {
            WPJOBPORTALlayout::getSystemOffline();
        } elseif (WPJOBPORTALincluder::getObjectClass('user')->isdisabled()) { // handling for the user disabled
            WPJOBPORTALlayout::getUserDisabledMsg();
        } else {
            $module = WPJOBPORTALrequest::getVar('wpjobportalme', null, 'jobsearch');
            WPJOBPORTALincluder::include_file($module);
        }
        unset(wpjobportal::$_data['sanitized_args']);
        $content .= ob_get_clean();
        return $content;
    }

Code file location:

wp-job-portal/wp-job-portal/includes/shortcodes.php

WP Job Portal [wpjobportal_job] Shortcode

The WP Job Portal shortcode is a powerful tool that allows you to display job listings on your website. This shortcode initiates the ‘show_job’ function, which sets default parameters and checks for user access and site status. If the site is offline or the user is disabled, appropriate messages are displayed. Otherwise, it includes the ‘job’ module, which displays the job listings. The shortcode also manages the style sheets and page ID.

Shortcode: [wpjobportal_job]

Parameters

Here is a list of all possible wpjobportal_job shortcode parameters and attributes:

  • wpjobportalme – determines the type of content to be displayed, default is ‘job’
  • wpjobportallt – controls the label of the content type, default is ‘jobs’

Examples and Usage

Basic example – Show a specific job by using the ‘wpjobportal_job’ shortcode. This shortcode will display the job content as defined in the WP Job Portal plugin.

[wpjobportal_job wpjobportalme="job" /]

Advanced examples

Display a list of jobs by using the ‘wpjobportal_job’ shortcode with the ‘wpjobportallt’ parameter. This will show a list of all jobs as defined in the WP Job Portal plugin.

[wpjobportal_job wpjobportallt="jobs" /]

Combine both parameters ‘wpjobportalme’ and ‘wpjobportallt’ to display a specific job from a list of jobs. This can be useful when you want to highlight a specific job within a list of jobs on your website.

[wpjobportal_job wpjobportalme="job" wpjobportallt="jobs" /]

PHP Function Code

In case you have difficulties debugging what causing issues with [wpjobportal_job] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('wpjobportal_job', array($this, 'show_job'));

Shortcode PHP function:

function show_job($raw_args, $content = null) {
        //default set of parameters for the front end shortcodes
        ob_start();
        $defaults = array(
            'wpjobportalme' => 'job',
            'wpjobportallt' => 'jobs',
        );
        $sanitized_args = shortcode_atts($defaults, $raw_args);
        if(isset(wpjobportal::$_data['sanitized_args']) && !empty(wpjobportal::$_data['sanitized_args'])){
            wpjobportal::$_data['sanitized_args'] += $sanitized_args;
        }else{
            wpjobportal::$_data['sanitized_args'] = $sanitized_args;
        }
        $pageid = get_the_ID();
        wpjobportal::wpjobportal_setPageID($pageid);
        wpjobportal::wpjobportal_addStyleSheets();
        $offline = wpjobportal::$_config->getConfigurationByConfigName('offline');
        if ($offline == 1) {
            WPJOBPORTALlayout::getSystemOffline();
        } elseif (WPJOBPORTALincluder::getObjectClass('user')->isdisabled()) { // handling for the user disabled
            WPJOBPORTALlayout::getUserDisabledMsg();
        } else {
            $module = WPJOBPORTALrequest::getVar('wpjobportalme', null, 'job');
            WPJOBPORTALincluder::include_file($module);
        }
        unset(wpjobportal::$_data['sanitized_args']);
        $content .= ob_get_clean();
        return $content;
    }

Code file location:

wp-job-portal/wp-job-portal/includes/shortcodes.php

WP Job Portal [wpjobportal_job_categories] Shortcode

The WP Job Portal shortcode is a powerful tool that displays job categories on your site. It sets up parameters, checks system status, and includes necessary files. It first sanitizes input arguments and stores them for later use. Then, it identifies the page ID and applies relevant stylesheets. If the system is offline or user is disabled, it displays appropriate messages. If not, it includes the required file based on the given module. Finally, it cleans up the stored data and returns the modified content.

Shortcode: [wpjobportal_job_categories]

Parameters

Here is a list of all possible wpjobportal_job_categories shortcode parameters and attributes:

  • wpjobportalme – specifies the type of job listing to display
  • wpjobportallt – determines the layout type of the job listings

Examples and Usage

Basic example – Show job categories using the wpjobportal_job_categories shortcode.

[wpjobportal_job_categories]

Advanced examples

Display job categories by adding specific parameters to the shortcode. In this example, the ‘wpjobportalme’ parameter is set to ‘job’ and the ‘wpjobportallt’ parameter is set to ‘jobsbycategories’.

[wpjobportal_job_categories wpjobportalme="job" wpjobportallt="jobsbycategories"]

Or you can use the shortcode to display job categories with different parameters. For instance, you can change the ‘wpjobportallt’ parameter to ‘jobsbyindustry’ to display jobs by industry categories.

[wpjobportal_job_categories wpjobportalme="job" wpjobportallt="jobsbyindustry"]

PHP Function Code

In case you have difficulties debugging what causing issues with [wpjobportal_job_categories] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('wpjobportal_job_categories', array($this, 'show_job_categories'));

Shortcode PHP function:

function show_job_categories($raw_args, $content = null) {
        //default set of parameters for the front end shortcodes
        ob_start();
        $defaults = array(
            'wpjobportalme' => 'job',
            'wpjobportallt' => 'jobsbycategories',
        );
        $sanitized_args = shortcode_atts($defaults, $raw_args);
        if(isset(wpjobportal::$_data['sanitized_args']) && !empty(wpjobportal::$_data['sanitized_args'])){
            wpjobportal::$_data['sanitized_args'] += $sanitized_args;
        }else{
            wpjobportal::$_data['sanitized_args'] = $sanitized_args;
        }
        $pageid = get_the_ID();
        wpjobportal::wpjobportal_setPageID($pageid);
        wpjobportal::wpjobportal_addStyleSheets();
        $offline = wpjobportal::$_config->getConfigurationByConfigName('offline');
        if ($offline == 1) {
            WPJOBPORTALlayout::getSystemOffline();
        } elseif (WPJOBPORTALincluder::getObjectClass('user')->isdisabled()) { // handling for the user disabled
            WPJOBPORTALlayout::getUserDisabledMsg();
        } else {
            $module = WPJOBPORTALrequest::getVar('wpjobportalme', null, 'job');
            WPJOBPORTALincluder::include_file($module);
        }
                unset(wpjobportal::$_data['sanitized_args']);
        $content .= ob_get_clean();
        return $content;
    }

Code file location:

wp-job-portal/wp-job-portal/includes/shortcodes.php

WP Job Portal [wpjobportal_job_types] Shortcode

The WP Job Portal shortcode is a functional script that displays job types on your website. It fetches job types from the database and displays them on the frontend. It first sanitizes input parameters, sets the page ID, and applies necessary styles. If the site is offline, it shows an offline message. If a user is disabled, it displays a specific message. Otherwise, it includes the job module and displays job types.

Shortcode: [wpjobportal_job_types]

Parameters

Here is a list of all possible wpjobportal_job_types shortcode parameters and attributes:

  • wpjobportalme – Specifies the module name to be included
  • wpjobportallt – Defines the layout type for the job portal

Examples and Usage

Basic example – The basic usage of the wpjobportal_job_types shortcode is to display job types from the WP Job Portal plugin. It uses default parameters to fetch and display the job types.

[wpjobportal_job_types]

Advanced examples

Using the shortcode with additional parameters to customize the output. In this example, we are changing the default ‘wpjobportalme’ parameter to ‘customjob’ and ‘wpjobportallt’ parameter to ‘customjobsbytypes’. This will fetch and display job types based on the customized parameters.

[wpjobportal_job_types wpjobportalme="customjob" wpjobportallt="customjobsbytypes"]

Another advanced usage of the shortcode is to display job types from a specific page. Here we are passing the page ID as a parameter. This will fetch and display job types from the specified page.

[wpjobportal_job_types pageid="2"]

Please note that these are just examples, the actual output will depend on the configuration of the WP Job Portal plugin and the data available in your WordPress site.

PHP Function Code

In case you have difficulties debugging what causing issues with [wpjobportal_job_types] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('wpjobportal_job_types', array($this, 'show_job_types'));

Shortcode PHP function:

function show_job_types($raw_args, $content = null) {
        //default set of parameters for the front end shortcodes
        ob_start();
        $defaults = array(
            'wpjobportalme' => 'job',
            'wpjobportallt' => 'jobsbytypes',
        );
        $sanitized_args = shortcode_atts($defaults, $raw_args);
        if(isset(wpjobportal::$_data['sanitized_args']) && !empty(wpjobportal::$_data['sanitized_args'])){
            wpjobportal::$_data['sanitized_args'] += $sanitized_args;
        }else{
            wpjobportal::$_data['sanitized_args'] = $sanitized_args;
        }
        $pageid = get_the_ID();
        wpjobportal::wpjobportal_setPageID($pageid);
        wpjobportal::wpjobportal_addStyleSheets();
        $offline = wpjobportal::$_config->getConfigurationByConfigName('offline');
        if ($offline == 1) {
            WPJOBPORTALlayout::getSystemOffline();
        } elseif (WPJOBPORTALincluder::getObjectClass('user')->isdisabled()) { // handling for the user disabled
            WPJOBPORTALlayout::getUserDisabledMsg();
        } else {
            $module = WPJOBPORTALrequest::getVar('wpjobportalme', null, 'job');
            WPJOBPORTALincluder::include_file($module);
        }
                unset(wpjobportal::$_data['sanitized_args']);
        $content .= ob_get_clean();
        return $content;
    }

Code file location:

wp-job-portal/wp-job-portal/includes/shortcodes.php

WP Job Portal [wpjobportal_my_appliedjobs] Shortcode

The WP Job Portal shortcode is designed to display a user’s applied jobs. This shortcode fetches and displays the jobs a user has applied for on the front end. It sets default parameters, sanitizes them, and checks if the system is offline or the user is disabled. If not, it includes the necessary file to display the applied jobs.

Shortcode: [wpjobportal_my_appliedjobs]

Parameters

Here is a list of all possible wpjobportal_my_appliedjobs shortcode parameters and attributes:

  • wpjobportalme – specifies the module to be included in the page, default is ‘jobapply’
  • wpjobportallt – provides the layout for the applied jobs, default is ‘myappliedjobs’

Examples and Usage

Basic example – The following shortcode displays the jobs that the user has applied for on the front-end of your website.

[wpjobportal_my_appliedjobs]

Advanced examples

1. In this example, the shortcode is used to display the jobs that the user has applied for, by specifying the ‘wpjobportalme’ and ‘wpjobportallt’ parameters. This allows for more control over the output of the shortcode.

[wpjobportal_my_appliedjobs wpjobportalme="jobapply" wpjobportallt="myappliedjobs"]

2. In this example, the shortcode is used to display the jobs that the user has applied for, by specifying different parameters. This allows for more customization of the output.

[wpjobportal_my_appliedjobs wpjobportalme="jobapply" wpjobportallt="customjobs"]

PHP Function Code

In case you have difficulties debugging what causing issues with [wpjobportal_my_appliedjobs] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('wpjobportal_my_appliedjobs', array($this, 'show_my_appliedjobs'));

Shortcode PHP function:

function show_my_appliedjobs($raw_args, $content = null) {
        //default set of parameters for the front end shortcodes
        ob_start();
        $defaults = array(
            'wpjobportalme' => 'jobapply',
            'wpjobportallt' => 'myappliedjobs',
        );
        $sanitized_args = shortcode_atts($defaults, $raw_args);
        if(isset(wpjobportal::$_data['sanitized_args']) && !empty(wpjobportal::$_data['sanitized_args'])){
            wpjobportal::$_data['sanitized_args'] += $sanitized_args;
        }else{
            wpjobportal::$_data['sanitized_args'] = $sanitized_args;
        }
        $pageid = get_the_ID();
        wpjobportal::wpjobportal_setPageID($pageid);
        wpjobportal::wpjobportal_addStyleSheets();
        $offline = wpjobportal::$_config->getConfigurationByConfigName('offline');
        if ($offline == 1) {
            WPJOBPORTALlayout::getSystemOffline();
        } elseif (WPJOBPORTALincluder::getObjectClass('user')->isdisabled()) { // handling for the user disabled
            WPJOBPORTALlayout::getUserDisabledMsg();
        } else {
            $module = WPJOBPORTALrequest::getVar('wpjobportalme', null, 'jobapply');
            WPJOBPORTALincluder::include_file($module);
        }
                unset(wpjobportal::$_data['sanitized_args']);
        $content .= ob_get_clean();
        return $content;
    }

Code file location:

wp-job-portal/wp-job-portal/includes/shortcodes.php

WP Job Portal [wpjobportal_my_companies] Shortcode

The WP Job Portal shortcode enables users to display their companies on a page. It checks if the ‘multicompany’ addon is active; if not, it defaults to ‘company’. It sanitizes arguments and sets the page ID. It also adds style sheets and checks if the system is offline. If the user is disabled, it displays a message. Otherwise, it includes the specified module.

Shortcode: [wpjobportal_my_companies]

Parameters

Here is a list of all possible wpjobportal_my_companies shortcode parameters and attributes:

  • wpjobportalme – determines the module to be used, either ‘multicompany’ or ‘company’
  • wpjobportallt – sets the layout to ‘mycompanies’

Examples and Usage

Basic example – Show all companies owned by the logged-in user.

[wpjobportal_my_companies /]

Advanced examples

Display all companies owned by the logged-in user with a specific module. The module can either be ‘multicompany’ or ‘company’.

[wpjobportal_my_companies wpjobportalme="multicompany" /]

Display all companies owned by the logged-in user with a specific layout. The layout can be any string, but in the context of this plugin, ‘mycompanies’ is a common choice.

[wpjobportal_my_companies wpjobportallt="mycompanies" /]

Combining both parameters, you can display all companies owned by the logged-in user with a specific module and layout.

[wpjobportal_my_companies wpjobportalme="multicompany" wpjobportallt="mycompanies" /]

PHP Function Code

In case you have difficulties debugging what causing issues with [wpjobportal_my_companies] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('wpjobportal_my_companies', array($this, 'show_my_companies'));

Shortcode PHP function:

function show_my_companies($raw_args, $content = null) {
        //default set of parameters for the front end shortcodes
        ob_start();
        if(in_array('multicompany', wpjobportal::$_active_addons)){
            $mod = "multicompany";
        }else{
            $mod = "company";
        }
        $defaults = array(
            'wpjobportalme' => $mod,
            'wpjobportallt' => 'mycompanies',
        );
        $sanitized_args = shortcode_atts($defaults, $raw_args);
        if(isset(wpjobportal::$_data['sanitized_args']) && !empty(wpjobportal::$_data['sanitized_args'])){
            wpjobportal::$_data['sanitized_args'] += $sanitized_args;
        }else{
            wpjobportal::$_data['sanitized_args'] = $sanitized_args;
        }
        $pageid = get_the_ID();
        wpjobportal::wpjobportal_setPageID($pageid);
        wpjobportal::wpjobportal_addStyleSheets();
        $offline = wpjobportal::$_config->getConfigurationByConfigName('offline');
        if ($offline == 1) {
            WPJOBPORTALlayout::getSystemOffline();
        } elseif (WPJOBPORTALincluder::getObjectClass('user')->isdisabled()) { // handling for the user disabled
            WPJOBPORTALlayout::getUserDisabledMsg();
        } else {
            $module = WPJOBPORTALrequest::getVar('wpjobportalme', null, 'company');
            WPJOBPORTALincluder::include_file($module);
        }
                unset(wpjobportal::$_data['sanitized_args']);
        $content .= ob_get_clean();
        return $content;
    }

Code file location:

wp-job-portal/wp-job-portal/includes/shortcodes.php

WP Job Portal [wpjobportal_my_departments] Shortcode

The WP Job Portal plugin shortcode, ‘wpjobportal_my_departments’, displays the user’s departments. It sets default parameters, sanitizes user inputs, and handles user accessibility depending on their status.

Shortcode: [wpjobportal_my_departments]

Parameters

Here is a list of all possible wpjobportal_my_departments shortcode parameters and attributes:

  • wpjobportalme – Defines the module to be included, default is ‘departments’.
  • wpjobportallt – Represents the layout type for the shortcode, default is ‘mydepartments’.

Examples and Usage

Basic example – Displaying the user’s departments using the shortcode.

[wpjobportal_my_departments /]

Advanced examples

Displaying the user’s departments with custom parameters. Here, ‘wpjobportalme’ is set to ‘departments’ and ‘wpjobportallt’ is set to ‘mydepartments’.

[wpjobportal_my_departments wpjobportalme="departments" wpjobportallt="mydepartments" /]

Another advanced example could be to use the shortcode to display a specific department by referencing the department ID. If the department is not found, it will display a message to the user.

[wpjobportal_my_departments wpjobportalme="departments" wpjobportallt="departmentID" /]

PHP Function Code

In case you have difficulties debugging what causing issues with [wpjobportal_my_departments] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('wpjobportal_my_departments', array($this, 'show_my_departments'));

Shortcode PHP function:

function show_my_departments($raw_args, $content = null) {
        //default set of parameters for the front end shortcodes
        ob_start();
        $defaults = array(
            'wpjobportalme' => 'departments',
            'wpjobportallt' => 'mydepartments',
        );
        $sanitized_args = shortcode_atts($defaults, $raw_args);
        if(isset(wpjobportal::$_data['sanitized_args']) && !empty(wpjobportal::$_data['sanitized_args'])){
            wpjobportal::$_data['sanitized_args'] += $sanitized_args;
        }else{
            wpjobportal::$_data['sanitized_args'] = $sanitized_args;
        }
        $pageid = get_the_ID();
        wpjobportal::wpjobportal_setPageID($pageid);
        wpjobportal::wpjobportal_addStyleSheets();
        $offline = wpjobportal::$_config->getConfigurationByConfigName('offline');
        if ($offline == 1) {
            WPJOBPORTALlayout::getSystemOffline();
        } elseif (WPJOBPORTALincluder::getObjectClass('user')->isdisabled()) { // handling for the user disabled
            WPJOBPORTALlayout::getUserDisabledMsg();
        } else {
            $module = WPJOBPORTALrequest::getVar('wpjobportalme', null, 'departments');
            WPJOBPORTALincluder::include_file($module);
        }
                unset(wpjobportal::$_data['sanitized_args']);
        $content .= ob_get_clean();
        return $content;
    }

Code file location:

wp-job-portal/wp-job-portal/includes/shortcodes.php

WP Job Portal [wpjobportal_my_jobs] Shortcode

The WP Job Portal plugin shortcode, ‘wpjobportal_my_jobs’, displays a user’s job listings. It sets parameters, checks system status, and handles user accessibility. This shortcode fetches and displays the jobs posted by a specific user. It also manages system offline messages and user disablement scenarios, ensuring smooth user experience.

Shortcode: [wpjobportal_my_jobs]

Parameters

Here is a list of all possible wpjobportal_my_jobs shortcode parameters and attributes:

  • wpjobportalme – specifies the module to be included, default is ‘job’
  • wpjobportallt – indicates the layout type, default is ‘myjobs’

Examples and Usage

Basic example – The basic usage of the shortcode ‘wpjobportal_my_jobs’ allows you to display the current user’s jobs on a page.

[wpjobportal_my_jobs /]

Advanced examples

Using the shortcode to display the current user’s jobs with specific parameters. Here, ‘wpjobportalme’ is set to ‘job’, and ‘wpjobportallt’ is set to ‘myjobs’.

[wpjobportal_my_jobs wpjobportalme="job" wpjobportallt="myjobs" /]

Another advanced usage could be when you want to display a different type of content instead of jobs. For instance, if you want to display the user’s applications, you can set ‘wpjobportalme’ to ‘application’.

[wpjobportal_my_jobs wpjobportalme="application" /]

These examples demonstrate the flexibility and customization options available with the ‘wpjobportal_my_jobs’ shortcode. You can adjust the parameters according to your needs to display the desired content.

PHP Function Code

In case you have difficulties debugging what causing issues with [wpjobportal_my_jobs] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('wpjobportal_my_jobs', array($this, 'show_my_jobs'));

Shortcode PHP function:

function show_my_jobs($raw_args, $content = null) {
        //default set of parameters for the front end shortcodes
        ob_start();
        $defaults = array(
            'wpjobportalme' => 'job',
            'wpjobportallt' => 'myjobs',
        );
        $sanitized_args = shortcode_atts($defaults, $raw_args);
        if(isset(wpjobportal::$_data['sanitized_args']) && !empty(wpjobportal::$_data['sanitized_args'])){
            wpjobportal::$_data['sanitized_args'] += $sanitized_args;
        }else{
            wpjobportal::$_data['sanitized_args'] = $sanitized_args;
        }
        $pageid = get_the_ID();
        wpjobportal::wpjobportal_setPageID($pageid);
        wpjobportal::wpjobportal_addStyleSheets();
        $offline = wpjobportal::$_config->getConfigurationByConfigName('offline');
        if ($offline == 1) {
            WPJOBPORTALlayout::getSystemOffline();
        } elseif (WPJOBPORTALincluder::getObjectClass('user')->isdisabled()) { // handling for the user disabled
            WPJOBPORTALlayout::getUserDisabledMsg();
        } else {
            $module = WPJOBPORTALrequest::getVar('wpjobportalme', null, 'job');
            WPJOBPORTALincluder::include_file($module);
        }
                unset(wpjobportal::$_data['sanitized_args']);
        $content .= ob_get_clean();
        return $content;
    }

Code file location:

wp-job-portal/wp-job-portal/includes/shortcodes.php

WP Job Portal [wpjobportal_my_resumes] Shortcode

The WP Job Portal shortcode is a powerful tool that displays user resumes. It starts by setting default parameters and sanitizing the given arguments. It then checks if the website is offline or if the user is disabled. If not, it includes the ‘resume’ module. The function ends by cleaning the output buffer and appending it to the content.

Shortcode: [wpjobportal_my_resumes]

Parameters

Here is a list of all possible wpjobportal_my_resumes shortcode parameters and attributes:

  • wpjobportalme – Determines the type of data to display, defaults to ‘resume’
  • wpjobportallt – Dictates the layout of the displayed data, defaults to ‘myresumes’

Examples and Usage

Basic example – Displays the ‘my resumes’ section on the page.

[wpjobportal_my_resumes]

Advanced examples

Display the ‘my resumes’ section with a specific module and layout. The shortcode will load the specified module and layout.

[wpjobportal_my_resumes wpjobportalme="resume" wpjobportallt="myresumes"]

Display the ‘my resumes’ section with a different module. This will load the specified module instead of the default ‘resume’ module.

[wpjobportal_my_resumes wpjobportalme="job"]

Display the ‘my resumes’ section with a different layout. This will load the specified layout instead of the default ‘myresumes’ layout.

[wpjobportal_my_resumes wpjobportallt="otherlayout"]

PHP Function Code

In case you have difficulties debugging what causing issues with [wpjobportal_my_resumes] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('wpjobportal_my_resumes', array($this, 'show_my_resumes'));

Shortcode PHP function:

function show_my_resumes($raw_args, $content = null) {
        //default set of parameters for the front end shortcodes
        ob_start();
        $defaults = array(
            'wpjobportalme' => 'resume',
            'wpjobportallt' => 'myresumes',
        );
        $sanitized_args = shortcode_atts($defaults, $raw_args);
        if(isset(wpjobportal::$_data['sanitized_args']) && !empty(wpjobportal::$_data['sanitized_args'])){
            wpjobportal::$_data['sanitized_args'] += $sanitized_args;
        }else{
            wpjobportal::$_data['sanitized_args'] = $sanitized_args;
        }
        $pageid = get_the_ID();
        wpjobportal::wpjobportal_setPageID($pageid);
        wpjobportal::wpjobportal_addStyleSheets();
        $offline = wpjobportal::$_config->getConfigurationByConfigName('offline');
        if ($offline == 1) {
            WPJOBPORTALlayout::getSystemOffline();
        } elseif (WPJOBPORTALincluder::getObjectClass('user')->isdisabled()) { // handling for the user disabled
            WPJOBPORTALlayout::getUserDisabledMsg();
        } else {
            $module = WPJOBPORTALrequest::getVar('wpjobportalme', null, 'resume');
            WPJOBPORTALincluder::include_file($module);
        }
                unset(wpjobportal::$_data['sanitized_args']);
        $content .= ob_get_clean();
        return $content;
    }

Code file location:

wp-job-portal/wp-job-portal/includes/shortcodes.php

WP Job Portal [wpjobportal_add_company] Shortcode

The WP Job Portal shortcode is designed to add a company to the job portal. It checks if the ‘multicompany’ addon is active and sets the parameters accordingly. It then sanitizes the input arguments and sets the page ID. It includes the necessary style sheets and checks if the system is offline or if the user is disabled. If neither condition is met, it includes the company module. The shortcode then cleans up the arguments and returns the content.

Shortcode: [wpjobportal_add_company]

Examples and Usage

Basic example – Add a company to the job portal using the wpjobportal_add_company shortcode.

[wpjobportal_add_company /]

Advanced examples

Use the shortcode to add a company to the job portal with the multicompany mode activated. Here, the ‘wpjobportalme’ parameter is set to ‘multicompany’.

[wpjobportal_add_company wpjobportalme='multicompany' /]

Use the shortcode to add a company to the job portal with a custom layout template. Here, the ‘wpjobportallt’ parameter is set to ‘customlayout’.

[wpjobportal_add_company wpjobportallt='customlayout' /]

Use the shortcode to add a company to the job portal with the multicompany mode activated and a custom layout template. Here, the ‘wpjobportalme’ parameter is set to ‘multicompany’ and the ‘wpjobportallt’ parameter is set to ‘customlayout’.

[wpjobportal_add_company wpjobportalme='multicompany' wpjobportallt='customlayout' /]

PHP Function Code

In case you have difficulties debugging what causing issues with [wpjobportal_add_company] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('wpjobportal_add_company', array($this, 'show_add_company'));

Shortcode PHP function:

function show_add_company($raw_args, $content = null) {
        //default set of parameters for the front end shortcodes
        ob_start();
        if(in_array('multicompany', wpjobportal::$_active_addons)){
            $mod = "multicompany";
        }else{
            $mod = "company";
        }
        $defaults = array(
            'wpjobportalme' => $mod,
            'wpjobportallt' => 'addcompany',
        );
        $sanitized_args = shortcode_atts($defaults, $raw_args);
        if(isset(wpjobportal::$_data['sanitized_args']) && !empty(wpjobportal::$_data['sanitized_args'])){
            wpjobportal::$_data['sanitized_args'] += $sanitized_args;
        }else{
            wpjobportal::$_data['sanitized_args'] = $sanitized_args;
        }
        $pageid = get_the_ID();
        wpjobportal::wpjobportal_setPageID($pageid);
        wpjobportal::wpjobportal_addStyleSheets();
        $offline = wpjobportal::$_config->getConfigurationByConfigName('offline');
        if ($offline == 1) {
            WPJOBPORTALlayout::getSystemOffline();
        } elseif (WPJOBPORTALincluder::getObjectClass('user')->isdisabled()) { // handling for the user disabled
            WPJOBPORTALlayout::getUserDisabledMsg();
        } else {
            $module = WPJOBPORTALrequest::getVar('wpjobportalme', null, 'company');
            WPJOBPORTALincluder::include_file($module);
        }
                unset(wpjobportal::$_data['sanitized_args']);
        $content .= ob_get_clean();
        return $content;
    }

Code file location:

wp-job-portal/wp-job-portal/includes/shortcodes.php

WP Job Portal [wpjobportal_add_department] Shortcode

The WP Job Portal shortcode allows users to add a new department to their job portal. It sets default parameters, sanitizes input, and checks for system status before execution.

Shortcode: [wpjobportal_add_department]

Parameters

Here is a list of all possible wpjobportal_add_department shortcode parameters and attributes:

  • wpjobportalme – Defines the module to be loaded, default is ‘departments’.
  • wpjobportallt – Specifies the layout type, default is ‘adddepartment’.

Examples and Usage

Basic example – The shortcode displays the department addition form.

[wpjobportal_add_department]

Advanced examples

Using the shortcode to display the department addition form and setting the module to ‘departments’ and layout to ‘adddepartment’.

[wpjobportal_add_department wpjobportalme="departments" wpjobportallt="adddepartment"]

Using the shortcode to display the department addition form, but changing the module to ‘positions’ and layout to ‘addposition’. This will display the form to add a position instead of a department.

[wpjobportal_add_department wpjobportalme="positions" wpjobportallt="addposition"]

Please note that the ‘wpjobportalme’ parameter changes the module that the form relates to, and the ‘wpjobportallt’ parameter changes the layout of the form. You can set these parameters to any valid module or layout within your WP Job Portal plugin.

PHP Function Code

In case you have difficulties debugging what causing issues with [wpjobportal_add_department] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('wpjobportal_add_department', array($this, 'show_add_department'));

Shortcode PHP function:

function show_add_department($raw_args, $content = null) {
        //default set of parameters for the front end shortcodes
        ob_start();
        $defaults = array(
            'wpjobportalme' => 'departments',
            'wpjobportallt' => 'adddepartment',
        );
        $sanitized_args = shortcode_atts($defaults, $raw_args);
        if(isset(wpjobportal::$_data['sanitized_args']) && !empty(wpjobportal::$_data['sanitized_args'])){
            wpjobportal::$_data['sanitized_args'] += $sanitized_args;
        }else{
            wpjobportal::$_data['sanitized_args'] = $sanitized_args;
        }
        $pageid = get_the_ID();
        wpjobportal::wpjobportal_setPageID($pageid);
        wpjobportal::wpjobportal_addStyleSheets();
        $offline = wpjobportal::$_config->getConfigurationByConfigName('offline');
        if ($offline == 1) {
            WPJOBPORTALlayout::getSystemOffline();
        } elseif (WPJOBPORTALincluder::getObjectClass('user')->isdisabled()) { // handling for the user disabled
            WPJOBPORTALlayout::getUserDisabledMsg();
        } else {
            $module = WPJOBPORTALrequest::getVar('wpjobportalme', null, 'departments');
            WPJOBPORTALincluder::include_file($module);
        }
                unset(wpjobportal::$_data['sanitized_args']);
        $content .= ob_get_clean();
        return $content;
    }

Code file location:

wp-job-portal/wp-job-portal/includes/shortcodes.php

WP Job Portal [wpjobportal_add_job] Shortcode

The WP Job Portal shortcode is a powerful tool that enables users to add a job listing feature on their website. This shortcode, when added to a page, displays a job submission form. This shortcode function, ‘show_add_job’, initiates by setting default parameters. It then sanitizes the input arguments and stores them for later use. The function checks if the website is offline or if the user is disabled, and handles these scenarios appropriately by displaying relevant messages. If there are no such issues, it includes the ‘job’ module file. This file presumably contains the code to display the job submission form. After execution, it cleans up the stored data and returns the content.

Shortcode: [wpjobportal_add_job]

Parameters

Here is a list of all possible wpjobportal_add_job shortcode parameters and attributes:

  • wpjobportalme – Specifies the module to be included in the job portal
  • wpjobportallt – Defines the layout of the job addition page

Examples and Usage

Basic example – A shortcode that adds a job portal to the page.

[wpjobportal_add_job /]

Advanced examples

Adding a job portal with a custom module and layout. The module will default to ‘job’ and the layout to ‘addjob’ if not specified.

[wpjobportal_add_job wpjobportalme="custom_module" wpjobportallt="custom_layout" /]

Adding a job portal with a custom module only. The layout will default to ‘addjob’.

[wpjobportal_add_job wpjobportalme="custom_module" /]

Adding a job portal with a custom layout only. The module will default to ‘job’.

[wpjobportal_add_job wpjobportallt="custom_layout" /]

PHP Function Code

In case you have difficulties debugging what causing issues with [wpjobportal_add_job] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('wpjobportal_add_job', array($this, 'show_add_job'));

Shortcode PHP function:

function show_add_job($raw_args, $content = null) {
        //default set of parameters for the front end shortcodes
        ob_start();
        $defaults = array(
            'wpjobportalme' => 'job',
            'wpjobportallt' => 'addjob',
        );
        $sanitized_args = shortcode_atts($defaults, $raw_args);
        if(isset(wpjobportal::$_data['sanitized_args']) && !empty(wpjobportal::$_data['sanitized_args'])){
            wpjobportal::$_data['sanitized_args'] += $sanitized_args;
        }else{
            wpjobportal::$_data['sanitized_args'] = $sanitized_args;
        }
        $pageid = get_the_ID();
        wpjobportal::wpjobportal_setPageID($pageid);
        wpjobportal::wpjobportal_addStyleSheets();
        $offline = wpjobportal::$_config->getConfigurationByConfigName('offline');
        if ($offline == 1) {
            WPJOBPORTALlayout::getSystemOffline();
        } elseif (WPJOBPORTALincluder::getObjectClass('user')->isdisabled()) { // handling for the user disabled
            WPJOBPORTALlayout::getUserDisabledMsg();
        } else {
            $module = WPJOBPORTALrequest::getVar('wpjobportalme', null, 'job');
            WPJOBPORTALincluder::include_file($module);
        }
                unset(wpjobportal::$_data['sanitized_args']);
        $content .= ob_get_clean();
        return $content;
    }

Code file location:

wp-job-portal/wp-job-portal/includes/shortcodes.php

WP Job Portal [wpjobportal_add_resume] Shortcode

The WP Job Portal shortcode is a powerful tool that allows users to add a resume directly to the job portal. This shortcode first checks if the ‘multiresume’ add-on is active. If not, it defaults to ‘resume’. It then sets the parameters for the front-end shortcodes, sanitizes the arguments, and stores them. Next, it retrieves the page ID and sets it using wpjobportal_setPageID. It also adds the necessary stylesheets using wpjobportal_addStyleSheets. The shortcode then checks if the system is offline or if the user is disabled. If the system is offline, it displays an offline message. If the user is disabled, it displays a disabled message. If neither condition is met, it executes the ‘resume’ module and includes the related file. Finally, it cleans up the buffer and returns the content.

Shortcode: [wpjobportal_add_resume]

Parameters

Here is a list of all possible wpjobportal_add_resume shortcode parameters and attributes:

  • wpjobportalme – specifies the type of resume, either a multiresume or a single resume.
  • wpjobportallt – sets the layout type as ‘addresume’ for the resume form.

Examples and Usage

Basic Example – Displaying the ‘Add Resume’ form using the wpjobportal_add_resume shortcode with default parameters.

[wpjobportal_add_resume]

Advanced Examples

Using the shortcode to display the ‘Add Resume’ form in the ‘multiresume’ mode if the multiresume addon is active. This mode enables users to add multiple resumes.

[wpjobportal_add_resume wpjobportalme="multiresume"]

Using the shortcode to display the ‘Add Resume’ form with a custom template. This allows you to customize the appearance and layout of the form.

[wpjobportal_add_resume wpjobportallt="custom_addresume_template"]

In these examples, ‘wpjobportalme’ is the parameter that specifies the mode for the form (either ‘resume’ or ‘multiresume’), and ‘wpjobportallt’ is the parameter that specifies the template to use for the form.

PHP Function Code

In case you have difficulties debugging what causing issues with [wpjobportal_add_resume] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('wpjobportal_add_resume', array($this, 'show_add_resume'));

Shortcode PHP function:

function show_add_resume($raw_args, $content = null) {
        //default set of parameters for the front end shortcodes
        ob_start();
        if(in_array('multiresume', wpjobportal::$_active_addons)){
            $mod = "multiresume";
        }else{
            $mod = "resume";
        }
        $defaults = array(
            'wpjobportalme' => $mod,
            'wpjobportallt' => 'addresume',
        );
        $sanitized_args = shortcode_atts($defaults, $raw_args);
        if(isset(wpjobportal::$_data['sanitized_args']) && !empty(wpjobportal::$_data['sanitized_args'])){
            wpjobportal::$_data['sanitized_args'] += $sanitized_args;
        }else{
            wpjobportal::$_data['sanitized_args'] = $sanitized_args;
        }
        $pageid = get_the_ID();
        wpjobportal::wpjobportal_setPageID($pageid);
        wpjobportal::wpjobportal_addStyleSheets();
        $offline = wpjobportal::$_config->getConfigurationByConfigName('offline');
        if ($offline == 1) {
            WPJOBPORTALlayout::getSystemOffline();
        } elseif (WPJOBPORTALincluder::getObjectClass('user')->isdisabled()) { // handling for the user disabled
            WPJOBPORTALlayout::getUserDisabledMsg();
        } else {
            $module = WPJOBPORTALrequest::getVar('wpjobportalme', null, 'resume');
            WPJOBPORTALincluder::include_file($module);
        }
                unset(wpjobportal::$_data['sanitized_args']);
        $content .= ob_get_clean();
        return $content;
    }

Code file location:

wp-job-portal/wp-job-portal/includes/shortcodes.php

WP Job Portal [wpjobportal_employer_registration] Shortcode

The WP Job Portal shortcode is responsible for displaying the employer registration form. It sanitizes input parameters, sets the page ID, and adds necessary style sheets. It checks if the system is offline or user is disabled, displaying appropriate messages. If not, it includes the necessary user module file. Finally, it cleans up the buffer and returns the content.

Shortcode: [wpjobportal_employer_registration]

Parameters

Here is a list of all possible wpjobportal_employer_registration shortcode parameters and attributes:

  • wpjobportalme – determines the user type for the registration form
  • wpjobportallt – sets the registration layout type as employer registration

Examples and Usage

Basic example – In this example, we are using the ‘wpjobportal_employer_registration’ shortcode to display the employer registration form on a page or post.

[wpjobportal_employer_registration /]

Advanced examples

Here, we are using the ‘wpjobportal_employer_registration’ shortcode with two parameters. The ‘wpjobportalme’ parameter is set to ‘admin’ and the ‘wpjobportallt’ parameter is set to ‘regemployer’. This will display the employer registration form with admin privileges.

[wpjobportal_employer_registration wpjobportalme="admin" wpjobportallt="regemployer" /]

In this advanced example, we are using the ‘wpjobportal_employer_registration’ shortcode with the ‘wpjobportalme’ parameter set to ‘user’ and the ‘wpjobportallt’ parameter set to ‘regemployer’. This will display the employer registration form for regular users.

[wpjobportal_employer_registration wpjobportalme="user" wpjobportallt="regemployer" /]

Please note that you’ll need to replace the values of the ‘wpjobportalme’ and ‘wpjobportallt’ parameters with the actual values you want to use based on your specific requirements.

PHP Function Code

In case you have difficulties debugging what causing issues with [wpjobportal_employer_registration] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('wpjobportal_employer_registration', array($this, 'show_employer_registration'));

Shortcode PHP function:

function show_employer_registration($raw_args, $content = null) {
        //default set of parameters for the front end shortcodes
        ob_start();
        $defaults = array(
            'wpjobportalme' => 'user',
            'wpjobportallt' => 'regemployer',
        );
        $sanitized_args = shortcode_atts($defaults, $raw_args);
        if(isset(wpjobportal::$_data['sanitized_args']) && !empty(wpjobportal::$_data['sanitized_args'])){
            wpjobportal::$_data['sanitized_args'] += $sanitized_args;
        }else{
            wpjobportal::$_data['sanitized_args'] = $sanitized_args;
        }
        $pageid = get_the_ID();
        wpjobportal::wpjobportal_setPageID($pageid);
        wpjobportal::wpjobportal_addStyleSheets();
        $offline = wpjobportal::$_config->getConfigurationByConfigName('offline');
        if ($offline == 1) {
            WPJOBPORTALlayout::getSystemOffline();
        } elseif (WPJOBPORTALincluder::getObjectClass('user')->isdisabled()) { // handling for the user disabled
            WPJOBPORTALlayout::getUserDisabledMsg();
        } else {
            $module = WPJOBPORTALrequest::getVar('wpjobportalme', null, 'user');
            WPJOBPORTALincluder::include_file($module);
        }
                unset(wpjobportal::$_data['sanitized_args']);
        $content .= ob_get_clean();
        return $content;
    }

Code file location:

wp-job-portal/wp-job-portal/includes/shortcodes.php

WP Job Portal [wpjobportal_jobseeker_registration] Shortcode

The WP Job Portal shortcode facilitates jobseeker registration on a website. It sets default parameters, sanitizes inputs, and handles user access based on system status. It identifies the page ID, adds necessary style sheets, and checks if the system is offline or if the user is disabled. If the system is online and the user enabled, it includes the necessary module.

Shortcode: [wpjobportal_jobseeker_registration]

Parameters

Here is a list of all possible wpjobportal_jobseeker_registration shortcode parameters and attributes:

  • wpjobportalme – determines the module to be included in the page
  • wpjobportallt – sets the layout type for the registration page

Examples and Usage

Basic example – Show a simple usage of the wpjobportal_jobseeker_registration shortcode to display the registration form for job seekers.

[wpjobportal_jobseeker_registration wpjobportalme="user" wpjobportallt="regjobseeker" /]

For advanced examples:

Advanced example 1 – This shortcode will display the registration form for job seekers and also include additional parameters. It shows the capability to extend the shortcode’s functionality by adding more parameters.

[wpjobportal_jobseeker_registration wpjobportalme="user" wpjobportallt="regjobseeker" param1="value1" param2="value2" /]

Advanced example 2 – This shortcode will display the registration form for job seekers and also include a custom parameter. This custom parameter can be used to customize the registration form based on your specific needs.

[wpjobportal_jobseeker_registration wpjobportalme="user" wpjobportallt="regjobseeker" custom_param="custom_value" /]

PHP Function Code

In case you have difficulties debugging what causing issues with [wpjobportal_jobseeker_registration] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('wpjobportal_jobseeker_registration', array($this, 'show_jobseeker_registration'));

Shortcode PHP function:

function show_jobseeker_registration($raw_args, $content = null) {
        //default set of parameters for the front end shortcodes
        ob_start();
        $defaults = array(
            'wpjobportalme' => 'user',
            'wpjobportallt' => 'regjobseeker',
        );
        $sanitized_args = shortcode_atts($defaults, $raw_args);
        if(isset(wpjobportal::$_data['sanitized_args']) && !empty(wpjobportal::$_data['sanitized_args'])){
            wpjobportal::$_data['sanitized_args'] += $sanitized_args;
        }else{
            wpjobportal::$_data['sanitized_args'] = $sanitized_args;
        }
        $pageid = get_the_ID();
        wpjobportal::wpjobportal_setPageID($pageid);
        wpjobportal::wpjobportal_addStyleSheets();
        $offline = wpjobportal::$_config->getConfigurationByConfigName('offline');
        if ($offline == 1) {
            WPJOBPORTALlayout::getSystemOffline();
        } elseif (WPJOBPORTALincluder::getObjectClass('user')->isdisabled()) { // handling for the user disabled
            WPJOBPORTALlayout::getUserDisabledMsg();
        } else {
            $module = WPJOBPORTALrequest::getVar('wpjobportalme', null, 'user');
            WPJOBPORTALincluder::include_file($module);
        }
                unset(wpjobportal::$_data['sanitized_args']);
        $content .= ob_get_clean();
        return $content;
    }

Code file location:

wp-job-portal/wp-job-portal/includes/shortcodes.php

WP Job Portal [wpjobportal_jobseeker_my_stats] Shortcode

The WP Job Portal shortcode is designed to display personalized statistics for job seekers. It fetches data related to the user’s job search activity and displays it on the frontend. This shortcode functions by setting default parameters for the frontend shortcodes. It sanitizes the arguments passed, sets the page ID, and adds the necessary stylesheets. It then checks if the system is offline or if the user is disabled. If neither condition is met, it includes the necessary module to display the user’s job search statistics.

Shortcode: [wpjobportal_jobseeker_my_stats]

Parameters

Here is a list of all possible wpjobportal_jobseeker_my_stats shortcode parameters and attributes:

  • wpjobportalme – Determines the user type, default is ‘jobseeker’
  • wpjobportallt – Defines the type of content to be displayed, default is ‘mystats’

Examples and Usage

Basic example – Show the jobseeker’s stats using the default parameters.

[wpjobportal_jobseeker_my_stats]

Advanced examples

Display the jobseeker’s stats using a different module. In this example, we’re using the ’employer’ module instead of the default ‘jobseeker’ module.

[wpjobportal_jobseeker_my_stats wpjobportalme="employer"]

Specify a different layout for the jobseeker’s stats. Here, we’re using the ‘myprofile’ layout instead of the default ‘mystats’ layout.

[wpjobportal_jobseeker_my_stats wpjobportallt="myprofile"]

Combining both the module and layout parameters. This example shows the stats of the employer using the ‘myprofile’ layout.

[wpjobportal_jobseeker_my_stats wpjobportalme="employer" wpjobportallt="myprofile"]

PHP Function Code

In case you have difficulties debugging what causing issues with [wpjobportal_jobseeker_my_stats] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('wpjobportal_jobseeker_my_stats', array($this, 'show_jobseeker_my_stats'));

Shortcode PHP function:

function show_jobseeker_my_stats($raw_args, $content = null){
        //default set of parameters for the front end shortcodes
        ob_start();
        $defaults = array(
            'wpjobportalme' => 'jobseeker',
            'wpjobportallt' => 'mystats',
        );
        $sanitized_args = shortcode_atts($defaults, $raw_args);
        if(isset(wpjobportal::$_data['sanitized_args']) && !empty(wpjobportal::$_data['sanitized_args'])){
            wpjobportal::$_data['sanitized_args'] += $sanitized_args;
        }else{
            wpjobportal::$_data['sanitized_args'] = $sanitized_args;
        }
        $pageid = get_the_ID();
        wpjobportal::wpjobportal_setPageID($pageid);
        wpjobportal::wpjobportal_addStyleSheets();
        $offline = wpjobportal::$_config->getConfigurationByConfigName('offline');
        if ($offline == 1) {
            WPJOBPORTALlayout::getSystemOffline();
        } elseif (WPJOBPORTALincluder::getObjectClass('user')->isdisabled()) { // handling for the user disabled
            WPJOBPORTALlayout::getUserDisabledMsg();
        } else {
            $module = WPJOBPORTALrequest::getVar('wpjobportalme', null, 'jobseeker');
            WPJOBPORTALincluder::include_file($module);
        }
                unset(wpjobportal::$_data['sanitized_args']);
        $content .= ob_get_clean();
        return $content;
    }

Code file location:

wp-job-portal/wp-job-portal/includes/shortcodes.php

WP Job Portal [wpjobportal_employer_my_stats] Shortcode

The WP Job Portal shortcode is designed to display an employer’s statistics on their dashboard. This shortcode initiates a function that sets default parameters and sanitizes arguments. It retrieves the page ID and applies specific style sheets. The code checks if the system is offline or if the user is disabled, displaying appropriate messages if true. If not, it includes the ’employer’ module file to show the employer’s stats.

Shortcode: [wpjobportal_employer_my_stats]

Parameters

Here is a list of all possible wpjobportal_employer_my_stats shortcode parameters and attributes:

  • wpjobportalme – Determines the type of user, default is ’employer’
  • wpjobportallt – Defines the layout, default is ‘mystats’

Examples and Usage

Basic example – This shortcode displays the stats of the employer using the WP Job Portal plugin.

[wpjobportal_employer_my_stats wpjobportalme="employer" wpjobportallt="mystats"]

Advanced examples

Modifying the shortcode to display a different module other than the default ’employer’. For instance, if you want to display the ’employee’ module, you can change the ‘wpjobportalme’ attribute value to ’employee’.

[wpjobportal_employer_my_stats wpjobportalme="employee" wpjobportallt="mystats"]

Adding additional parameters. This example shows how to add a custom parameter ‘custom_param’ with a value of ‘custom_value’ to the shortcode.

[wpjobportal_employer_my_stats wpjobportalme="employer" wpjobportallt="mystats" custom_param="custom_value"]

Please note that the additional parameters will only work if they are recognized and processed by the ‘show_employer_my_stats’ function in the WP Job Portal plugin.

PHP Function Code

In case you have difficulties debugging what causing issues with [wpjobportal_employer_my_stats] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('wpjobportal_employer_my_stats', array($this, 'show_employer_my_stats'));

Shortcode PHP function:

function show_employer_my_stats($raw_args, $content = null){
        //default set of parameters for the front end shortcodes
        ob_start();
        $defaults = array(
            'wpjobportalme' => 'employer',
            'wpjobportallt' => 'mystats',
        );
        $sanitized_args = shortcode_atts($defaults, $raw_args);
        wpjobportal::$_data['sanitized_args'] = $sanitized_args;
        $pageid = get_the_ID();
        wpjobportal::wpjobportal_setPageID($pageid);
        wpjobportal::wpjobportal_addStyleSheets();
        $offline = wpjobportal::$_config->getConfigurationByConfigName('offline');
        if ($offline == 1) {
            WPJOBPORTALlayout::getSystemOffline();
        } elseif (WPJOBPORTALincluder::getObjectClass('user')->isdisabled()) { // handling for the user disabled
            WPJOBPORTALlayout::getUserDisabledMsg();
        } else {
            $module = WPJOBPORTALrequest::getVar('wpjobportalme', null, 'employer');
            WPJOBPORTALincluder::include_file($module);
        }
                unset(wpjobportal::$_data['sanitized_args']);
        $content .= ob_get_clean();
        return $content;
    }

Code file location:

wp-job-portal/wp-job-portal/includes/shortcodes.php

WP Job Portal [wpjobportal_login_page] Shortcode

The WP Job Portal shortcode is designed to display the login page. It starts by sanitizing the input parameters, then sets the page ID and adds style sheets. If the system is offline, it will display a system offline message. If the user is disabled, it will display a user disabled message. Otherwise, it will display the login page. The shortcode ends by cleaning the buffer and returning the content.

Shortcode: [wpjobportal_login_page]

Examples and Usage

Basic example – A simple shortcode to display the login page using the ‘wpjobportal_login_page’ shortcode.

[wpjobportal_login_page /]

Advanced examples

Using the shortcode to display the login page with custom parameters. The ‘wpjobportalme’ parameter is set to ‘myjobportal’, and ‘wpjobportallt’ is set to ‘signin’. This will customize the login page according to these parameters.

[wpjobportal_login_page wpjobportalme="myjobportal" wpjobportallt="signin" /]

Another advanced usage of the shortcode where the ‘wpjobportalme’ parameter is set to ‘jobportal’, and ‘wpjobportallt’ is set to ‘login’. This will display the login page with the specified customizations.

[wpjobportal_login_page wpjobportalme="jobportal" wpjobportallt="login" /]

PHP Function Code

In case you have difficulties debugging what causing issues with [wpjobportal_login_page] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('wpjobportal_login_page', array($this, 'show_login_page'));

Shortcode PHP function:

function show_login_page($raw_args, $content = null){
        //default set of parameters for the front end shortcodes
        ob_start();
        $defaults = array(
            'wpjobportalme' => 'wpjobportal',
            'wpjobportallt' => 'login',
        );
        $sanitized_args = shortcode_atts($defaults, $raw_args);
        if(isset(wpjobportal::$_data['sanitized_args']) && !empty(wpjobportal::$_data['sanitized_args'])){
            wpjobportal::$_data['sanitized_args'] += $sanitized_args;
        }else{
            wpjobportal::$_data['sanitized_args'] = $sanitized_args;
        }
        $pageid = get_the_ID();
        wpjobportal::wpjobportal_setPageID($pageid);
        wpjobportal::wpjobportal_addStyleSheets();
        $offline = wpjobportal::$_config->getConfigurationByConfigName('offline');
        if ($offline == 1) {
            WPJOBPORTALlayout::getSystemOffline();
        } elseif (WPJOBPORTALincluder::getObjectClass('user')->isdisabled()) { // handling for the user disabled
            WPJOBPORTALlayout::getUserDisabledMsg();
        } else {
            $module = WPJOBPORTALrequest::getVar('wpjobportalme', null, 'wpjobportal');
            WPJOBPORTALincluder::include_file($module);
        }
                unset(wpjobportal::$_data['sanitized_args']);
        $content .= ob_get_clean();
        return $content;
    }

Code file location:

wp-job-portal/wp-job-portal/includes/shortcodes.php

WP Job Portal [wpjobportal_resumes] Shortcode

The WP Job Portal shortcode [wpjobportal_resumes] is designed to display a list of resumes on your WordPress site. It offers an array of customization options, including the type of resume, title display, and various other details. The shortcode works by fetching data from the plugin’s database and displaying it in a user-friendly format. It also incorporates various style parameters to ensure the resumes blend seamlessly with your site’s design.

Shortcode: [wpjobportal_resumes]

Parameters

Here is a list of all possible wpjobportal_resumes shortcode parameters and attributes:

  • title – sets the title of the resume section.
  • typeofresume – specifies the type of resume to show.
  • showtitle – determines whether to display the title or not.
  • applicationtitle – controls the display of the application title.
  • name – controls the display of the name field.
  • category – sets the category of the resumes to show.
  • jobtype – sets the type of jobs to display.
  • experience – controls the display of the experience field.
  • available – controls the display of the availability field.
  • gender – controls the display of the gender field.
  • nationality – controls the display of the nationality field.
  • location – controls the display of the location field.
  • posted – controls the display of the posted date field.
  • noofresume – sets the number of resumes to display.
  • listingstyle – sets the style of the resume listing.
  • boxstyle – sets the style of the resume box.
  • fieldcolumn – sets the number of columns for fields.
  • moduleheight – sets the height of the module.
  • resumeheight – sets the height of the resume.
  • logowidth – sets the width of the logo.
  • logoheight – sets the height of the logo.
  • resumephoto – controls the display of the resume photo.
  • nofresumedesktop – sets the number of resumes for desktop view.
  • nofresumetablet – sets the number of resumes for tablet view.
  • topmargin – sets the top margin of the module.
  • leftmargin – sets the left margin of the module.
  • titlecolor – sets the color of the title.
  • titleborderbottom – sets the color of the title border bottom.
  • backgroundcolor – sets the background color of the module.
  • bordercolor – sets the border color of the module.
  • datalabelcolor – sets the color of the data label.
  • datavaluecolor – sets the color of the data value.

Examples and Usage

Basic example – Display a list of resumes with default settings

[wpjobportal_resumes]

For advanced usage, you can use various parameters to customize the output of the shortcode. Here are some examples:

Advanced example 1 – Display a list of newest resumes with a specific number of resumes

[wpjobportal_resumes typeofresume='1' noofresume='10']

Advanced example 2 – Display a list of top resumes, show the title, and adjust the module and resume height

[wpjobportal_resumes typeofresume='2' showtitle='1' moduleheight='500' resumeheight='300']

Advanced example 3 – Display a list of featured resumes, don’t show the nationality, and adjust logo dimensions

[wpjobportal_resumes typeofresume='4' nationality='0' logowidth='200' logoheight='120']

Remember, the values provided in the shortcode will override the default values. Therefore, you can customize the output as per your requirements.

PHP Function Code

In case you have difficulties debugging what causing issues with [wpjobportal_resumes] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('wpjobportal_resumes', array($this, 'show_resumes'));

Shortcode PHP function:

function show_resumes($raw_args, $content = null) {

        ob_start();

        $defaults = array(
            'title' => esc_html(__('Resumes', 'wp-job-portal')),
            'typeofresume' => '1',
            'showtitle' => '1',
            'applicationtitle' => '1',
            'name' => '1',
            'category' => '1',
            'jobtype' => '1',
            'experience' => '1',
            'available' => '1',
            'gender' => '1',
            'nationality' => '1',
            'location' => '1',
            'posted' => '1',
            'noofresume' => '5',
            'listingstyle' => '1',
            'boxstyle' => '1',
            'fieldcolumn' => '1',
            'moduleheight' => '400',
            'resumeheight' => '250',
            'logowidth' => '150',
            'logoheight' => '90',
            'resumephoto' => '1',
            'nofresumedesktop' => '1',
            'nofresumetablet' => '1',
            'topmargin' => '10',
            'leftmargin' => '10',
            'titlecolor' => '',
            'titleborderbottom' => '',
            'backgroundcolor' => '',
            'bordercolor' => '',
            'datalabelcolor' => '',
            'datavaluecolor' => '',
        );

        $arr = (object) shortcode_atts($defaults, $raw_args);
        $arr->subcategory = 0;

        wpjobportal::wpjobportal_addStyleSheets();
        $offline = wpjobportal::$_config->getConfigurationByConfigName('offline');
        if ($offline == 1) {
            WPJOBPORTALlayout::getSystemOffline();
        } else {
            $module = WPJOBPORTALrequest::getVar('wpjobportalme');
            if($module != null){
                $pageid = get_the_ID();
                wpjobportal::wpjobportal_setPageID($pageid);
                wpjobportal::wpjobportal_addStyleSheets();
                WPJOBPORTALincluder::include_file($module);
                $content .= ob_get_clean();
                return $content;
            }
            //Frontend HTML starts -----------
            $mod = 'fd';
            if ($arr->typeofresume == 1) {
                $mod = 'newestresume';
            } elseif ($arr->typeofresume == 2) {
                $mod = 'topresume';
            }  elseif ($arr->typeofresume == 4) {
                $mod = 'featuredresume';
            }

            $layoutName = $mod . uniqid();

            if ($arr->typeofresume != 0) {

                $resumes = WPJOBPORTALincluder::getJSModel('resume')->getResumes_Widget($arr->typeofresume, $arr->noofresume);
                // parameters [for later use]
                $speedTest = '';
                $sliding = '';
                $consecutivesliding = '';
                $slidingdirection = '';
                $separator = '';

                $modules_html = WPJOBPORTALincluder::getJSModel('wpjobportalwidgets')->listModuleResumes($layoutName, $resumes, $arr->noofresume, $arr->applicationtitle, $arr->name, $arr->experience, $arr->available, $arr->gender, $arr->nationality, $arr->location, $arr->category, $arr->subcategory, $arr->jobtype, $arr->posted, $separator, $arr->moduleheight, $arr->resumeheight, $arr->topmargin, $arr->leftmargin, $arr->logowidth, $arr->logoheight, $arr->fieldcolumn, $arr->listingstyle, $arr->title, $arr->showtitle, $speedTest, $sliding, $consecutivesliding, $slidingdirection, $arr->resumephoto, $arr->nofresumedesktop, $arr->nofresumetablet, $arr->boxstyle);
                echo wp_kses($modules_html, WPJOBPORTAL_ALLOWED_TAGS);
                $classname = $layoutName;

                $color1 = $arr->titlecolor;
                $color2 = $arr->titleborderbottom;
                $color3 = $arr->backgroundcolor;
                $color4 = $arr->bordercolor;
                $color5 = $arr->datalabelcolor;
                $color6 = $arr->datavaluecolor;

                $echo_style = WPJOBPORTALincluder::getJSModel('wpjobportalwidgets')->perpareStyleSheet($classname , $color1 , $color2 , $color3 , $color4 , $color5 , $color6 );
                echo wp_kses($echo_style, WPJOBPORTAL_ALLOWED_TAGS);
            }
        }

        $content .= ob_get_clean();
        return $content;
    }

Code file location:

wp-job-portal/wp-job-portal/includes/shortcodes.php

WP Job Portal [wpjobportal_companies] Shortcode

The WP Job Portal shortcode is designed to display a list of companies on your WordPress site. It pulls data such as company type, title, logo, category, location, and posting date. This shortcode allows for customization, with options to adjust the number of companies shown, the style of the listing, and the dimensions of the company logo. It also provides options for color customization for various elements. In offline mode, it displays a system offline message. If a specific module is set, it includes that file in the output. For a company type of ‘2’, it sets the module to ‘featured company’. The shortcode then retrieves the companies based on the company type and number specified, and generates the HTML to display them. The HTML is then output, along with a dynamically generated stylesheet for the module.

Shortcode: [wpjobportal_companies]

Parameters

Here is a list of all possible wpjobportal_companies shortcode parameters and attributes:

  • title – The title of the companies section.
  • companytype – Defines the type of company, 1 for regular, 2 for featured.
  • showtitle – If set to 1, the title of the company will be shown.
  • companylogo – If set to 1, the company’s logo will be displayed.
  • category – If set to 1, the category of the company will be shown.
  • location – If set to 1, the location of the company will be displayed.
  • posted – If set to 1, the date the company was posted will be shown.
  • noofcompanies – Defines the number of companies to be displayed.
  • listingstyle – Defines the style of the company listing.
  • boxstyle – Defines the style of the box containing the company information.
  • fieldcolumn – Defines the number of columns for the company fields.
  • moduleheight – Defines the height of the module in pixels.
  • companyheight – Defines the height of the company section in pixels.
  • complogowidth – Defines the width of the company logo in pixels.
  • complogoheight – Defines the height of the company logo in pixels.
  • nofcompanies – Defines the number of companies to be displayed.
  • nofcompaniesrowtab – Defines the number of companies per row in the table.
  • topmargin – Defines the top margin of the module in pixels.
  • leftmargin – Defines the left margin of the module in pixels.
  • titlecolor – Defines the color of the title.
  • titleborderbottom – Defines the color of the title’s bottom border.
  • backgroundcolor – Defines the background color of the module.
  • bordercolor – Defines the color of the border of the module.
  • datalabelcolor – Defines the color of the data label.
  • datavaluecolor – Defines the color of the data value.

Examples and Usage

Basic example – Display a list of companies using the ‘wpjobportal_companies’ shortcode. This example will use the default values for all parameters.

[wpjobportal_companies]

Advanced examples

Display a list of featured companies (companytype=2) with a custom title and displaying 10 companies (noofcompanies=10).

[wpjobportal_companies companytype=2 title="Featured Companies" noofcompanies=10]

Display a list of companies with a custom title, showing the company logo (companylogo=1), and defining the logo width and height (complogowidth=200, complogoheight=100).

[wpjobportal_companies title="Our Companies" companylogo=1 complogowidth=200 complogoheight=100]

Display a list of companies with custom colors for the title, border, and data labels (titlecolor=”#000000″, bordercolor=”#cccccc”, datalabelcolor=”#666666″).

[wpjobportal_companies titlecolor="#000000" bordercolor="#cccccc" datalabelcolor="#666666"]

PHP Function Code

In case you have difficulties debugging what causing issues with [wpjobportal_companies] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('wpjobportal_companies', array($this, 'show_companies'));

Shortcode PHP function:

function show_companies($raw_args, $content = null) {

        ob_start();

        $defaults = array(
            'title' => esc_html(__('Companies', 'wp-job-portal')),
            'companytype' => '1',
            'showtitle' => '1',
            'companylogo' => '1',
            'category' => '1',
            'location' => '1',
            'posted' => '1',
            'noofcompanies' => '5',
            'listingstyle' => '1',
            'boxstyle' => '1',
            'fieldcolumn' => '1',
            'moduleheight' => '400',
            'companyheight' => '250',
            'complogowidth' => '150',
            'complogoheight' => '90',
            'nofcompanies' => '1',
            'nofcompaniesrowtab' => '1',
            'topmargin' => '10',
            'leftmargin' => '10',
            'titlecolor' => '',
            'titleborderbottom' => '',
            'backgroundcolor' => '',
            'bordercolor' => '',
            'datalabelcolor' => '',
            'datavaluecolor' => '',
        );

        $arr = (object) shortcode_atts($defaults, $raw_args);

        wpjobportal::wpjobportal_addStyleSheets();
        $offline = wpjobportal::$_config->getConfigurationByConfigName('offline');
        if ($offline == 1) {
            WPJOBPORTALlayout::getSystemOffline();
        } else {
            $module = WPJOBPORTALrequest::getVar('wpjobportalme');
            if($module != null){
                $pageid = get_the_ID();
                wpjobportal::wpjobportal_setPageID($pageid);
                wpjobportal::wpjobportal_addStyleSheets();
                WPJOBPORTALincluder::include_file($module);
                $content .= ob_get_clean();
                return $content;
            }
            $mod = 'abc';
            if ($arr->companytype == 2) {
                $mod = 'featuredcompany';
            }
            $layoutName = $mod . uniqid();

            if ($arr->companytype != 0) {

                $companies = WPJOBPORTALincluder::getJSModel('company')->getCompanies_Widget($arr->companytype, $arr->noofcompanies);
                //parameters [for later use]
                $theme = '';
                $jobwidth = '';
                $jobfloat = '';
                $speedTest = '';
                $sliding = '';
                $slidingdirection = '';
                $consecutivesliding = '';

                $modules_html = WPJOBPORTALincluder::getJSModel('wpjobportalwidgets')->listModuleCompanies($layoutName, $companies, $arr->noofcompanies, $arr->category, $arr->posted, $arr->listingstyle, $theme, $arr->location, $arr->moduleheight, $jobwidth, $arr->companyheight, $jobfloat, $arr->topmargin, $arr->leftmargin, $arr->companylogo, $arr->complogowidth, $arr->complogoheight, $arr->fieldcolumn, $arr->listingstyle, $arr->title, $arr->showtitle, $speedTest, $sliding, $slidingdirection, $consecutivesliding, $arr->nofcompanies, $arr->nofcompaniesrowtab, $arr->boxstyle);

                echo wp_kses($modules_html, WPJOBPORTAL_ALLOWED_TAGS);
                $classname = $layoutName;

                $color1 = $arr->titlecolor;
                $color2 = $arr->titleborderbottom;
                $color3 = $arr->backgroundcolor;
                $color4 = $arr->bordercolor;
                $color5 = $arr->datalabelcolor;
                $color6 = $arr->datavaluecolor;

                $echo_style = WPJOBPORTALincluder::getJSModel('wpjobportalwidgets')->perpareStyleSheet($classname , $color1 , $color2 , $color3 , $color4 , $color5 , $color6 );
                echo wp_kses($echo_style, WPJOBPORTAL_ALLOWED_TAGS);
            }
        }
        $content .= ob_get_clean();
        return $content;
    }

Code file location:

wp-job-portal/wp-job-portal/includes/shortcodes.php

WP Job Portal [wpjobportal_searchjob] Shortcode

The WP Job Portal shortcode is a powerful tool that allows you to display a job search widget on your WordPress site. This shortcode generates a comprehensive job search form, enabling users to filter jobs based on various parameters such as job title, category, type, status, salary range, shift, duration, publishing date, company, and address. The shortcode also includes an offline functionality, which displays a system offline message when activated.

Shortcode: [wpjobportal_searchjob]

Parameters

Here is a list of all possible wpjobportal_searchjob shortcode parameters and attributes:

  • title – Sets the title of the job search section.
  • showtitle – Controls if the title is displayed or not.
  • jobtitle – Controls if the job title is searchable or not.
  • category – Controls if job categories are searchable or not.
  • jobtype – Controls if job types are searchable or not.
  • jobstatus – Controls if job status is searchable or not.
  • salaryrange – Controls if salary range is searchable or not.
  • shift – Controls if shift times are searchable or not.
  • duration – Controls if job duration is searchable or not.
  • startpublishing – Controls if job start date is searchable or not.
  • stoppublishing – Controls if job end date is searchable or not.
  • company – Controls if company name is searchable or not.
  • address – Controls if job location is searchable or not.
  • columnperrow – Controls the number of columns per row in the job list.

Examples and Usage

Basic example – A shortcode to display the job search form with default parameters.

[wpjobportal_searchjob /]

Advanced examples

Display the job search form with a custom title and hide the job title field in the form.

[wpjobportal_searchjob title="Find Your Dream Job" jobtitle="0" /]

Display the job search form with a custom title and only show job title, category, and company fields in the form.

[wpjobportal_searchjob title="Search for Jobs" jobtype="0" jobstatus="0" salaryrange="0" shift="0" duration="0" startpublishing="0" stoppublishing="0" address="0" columnperrow="0" /]

Display the job search form in a two-column layout and hide the job status and salary range fields.

[wpjobportal_searchjob columnperrow="2" jobstatus="0" salaryrange="0" /]

Please replace the number “0” with “1” if you want to display the field and “0” if you want to hide the field in the form. The “title” attribute is used to set a custom title for the form.

PHP Function Code

In case you have difficulties debugging what causing issues with [wpjobportal_searchjob] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('wpjobportal_searchjob', array($this, 'show_searchjob'));

Shortcode PHP function:

function show_searchjob($raw_args, $content = null) {

        ob_start();

        $defaults = array(
            'title' => esc_html(__('Search job', 'wp-job-portal')),
            'showtitle' => '1',
            'jobtitle' => '1',
            'category' => '1',
            'jobtype' => '1',
            'jobstatus' => '1',
            'salaryrange' => '1',
            'shift' => '1',
            'duration' => '1',
            'startpublishing' => '1',
            'stoppublishing' => '1',
            'company' => '1',
            'address' => '1',
            'columnperrow' => '1',
        );

        $arr = (object) shortcode_atts($defaults, $raw_args);
        wpjobportal::wpjobportal_addStyleSheets();
        $offline = wpjobportal::$_config->getConfigurationByConfigName('offline');
        if ($offline == 1) {
            WPJOBPORTALlayout::getSystemOffline();
        } else {
            $module = WPJOBPORTALrequest::getVar('wpjobportalme');
            if($module != null){
                $pageid = get_the_ID();
                wpjobportal::wpjobportal_setPageID($pageid);
                wpjobportal::wpjobportal_addStyleSheets();
                WPJOBPORTALincluder::include_file($module);
                $content .= ob_get_clean();
                return $content;
            }
            $modules_html = WPJOBPORTALincluder::getJSModel('jobsearch')->getSearchJobs_Widget($arr->title, $arr->showtitle, $arr->jobtitle, $arr->category, $arr->jobtype, $arr->jobstatus, $arr->salaryrange, $arr->shift, $arr->duration, $arr->startpublishing, $arr->stoppublishing, $arr->company, $arr->address, $arr->columnperrow);
            echo wp_kses($modules_html, WPJOBPORTAL_ALLOWED_TAGS);
        }
        unset(wpjobportal::$_data['sanitized_args']);
        $content .= ob_get_clean();
        return $content;
    }

Code file location:

wp-job-portal/wp-job-portal/includes/shortcodes.php

WP Job Portal [wpjobportal_searchresume] Shortcode

The WP Job Portal shortcode ‘wpjobportal_searchresume’ is designed to create a search resume functionality on your website. This shortcode allows users to search for resumes based on various parameters such as title, name, nationality, gender, availability, job category, job type, salary range, highest education, and experience. It also provides options to customize the appearance and layout of the search resume widget. It ensures the site remains functional even when offline. If a specific module is requested, it includes the relevant file and adds it to the page content. This shortcode is a handy tool for any job portal site, enhancing user experience with its comprehensive search features.

Shortcode: [wpjobportal_searchresume]

Parameters

Here is a list of all possible wpjobportal_searchresume shortcode parameters and attributes:

  • title – Defines the title of the resume search form.
  • showtitle – Determines if the title should be displayed.
  • apptitle – Controls the display of the applicant’s title.
  • name – Controls the display of the applicant’s name field.
  • natinality – Controls the display of the nationality field.
  • gender – Controls the display of the gender field.
  • iamavailable – Controls the display of the availability field.
  • category – Controls the display of the job category field.
  • jobtype – Controls the display of the job type field.
  • salaryrange – Controls the display of the salary range field.
  • heighesteducation – Controls the display of the highest education field.
  • experience – Controls the display of the experience field.
  • columnperrow – Defines the number of columns per row in the form.

Examples and Usage

Basic Example – Showcases a simple implementation of the ‘wpjobportal_searchresume’ shortcode with default parameters.

[wpjobportal_searchresume]

Advanced Examples – Illustrates usage of the ‘wpjobportal_searchresume’ shortcode with custom parameters. Here, we are changing the title and limiting the columns per row to 3.

[wpjobportal_searchresume title="Custom Title" columnperrow="3"]

Another advanced example demonstrates how to disable certain fields from appearing in the search form. In this case, we’re hiding the ‘gender’ and ‘salaryrange’ fields.

[wpjobportal_searchresume gender="0" salaryrange="0"]

This final example showcases a more complex usage of the shortcode. Here, we’re customizing the title, disabling the ‘gender’ field, and setting the columns per row to 2.

[wpjobportal_searchresume title="Advanced Search" gender="0" columnperrow="2"]

PHP Function Code

In case you have difficulties debugging what causing issues with [wpjobportal_searchresume] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('wpjobportal_searchresume', array($this, 'show_searchresume'));

Shortcode PHP function:

function show_searchresume($raw_args, $content = null) {

        ob_start();

        $defaults = array(
            'title' => esc_html(__('Search Resume', 'wp-job-portal')),
            'showtitle' => '1',
            'apptitle' => '1',
            'name' => '1',
            'natinality' => '1',
            'gender' => '1',
            'iamavailable' => '1',
            'category' => '1',
            'jobtype' => '1',
            'salaryrange' => '1',
            'heighesteducation' => '1',
            'experience' => '1',
            'columnperrow' => '1',
        );

        $arr = (object) shortcode_atts($defaults, $raw_args);

        wpjobportal::wpjobportal_addStyleSheets();
        $offline = wpjobportal::$_config->getConfigurationByConfigName('offline');
        if ($offline == 1) {
            WPJOBPORTALlayout::getSystemOffline();
        } else {
            $module = WPJOBPORTALrequest::getVar('wpjobportalme');
            if($module != null){
                $pageid = get_the_ID();
                wpjobportal::wpjobportal_setPageID($pageid);
                wpjobportal::wpjobportal_addStyleSheets();
                WPJOBPORTALincluder::include_file($module);
                $content .= ob_get_clean();
                return $content;
            }
            $modules_html = WPJOBPORTALincluder::getJSModel('resumesearch')->getSearchResume_Widget($arr->title, $arr->showtitle, $arr->apptitle, $arr->name, $arr->natinality, $arr->gender, $arr->iamavailable, $arr->category, $arr->jobtype, $arr->salaryrange, $arr->heighesteducation, $arr->columnperrow, $arr->experience);
            echo wp_kses($modules_html, WPJOBPORTAL_ALLOWED_TAGS);
        }

        $content .= ob_get_clean();
        return $content;
    }

Code file location:

wp-job-portal/wp-job-portal/includes/shortcodes.php

WP Job Portal [wpjobportal_jobbycategory] Shortcode

The WP Job Portal shortcode is a versatile tool that displays job categories on a webpage. It enables you to customize the title, number of records, and layout. This shortcode also allows color customization for the title, background, and border. It fetches job categories from the database and displays them in a formatted layout. If the website is offline, it shows an offline message.

Shortcode: [wpjobportal_jobbycategory]

Parameters

Here is a list of all possible wpjobportal_jobbycategory shortcode parameters and attributes:

  • title – Sets the title of the job category display.
  • showtitle – Determines whether the title is displayed (‘1’) or not (‘0’).
  • maximumrecords – Specifies the maximum number of job categories to display.
  • haverecords – If set to ‘1’, only categories with jobs will be shown.
  • showallcats – If ‘2’, all job categories are shown, regardless of job availability.
  • columnperrow – Defines how many job categories are displayed per row.
  • titlecolor – Sets the color of the title text.
  • backgroundcolor – Defines the background color of the job category display.
  • bordercolor – Sets the color of the border around the job category display.

Examples and Usage

Basic example – Display jobs by categories with default parameters.

[wpjobportal_jobbycategory /]

Advanced examples

Display jobs by categories with a custom title, showing 10 records per page, and displaying all categories.

[wpjobportal_jobbycategory title="Latest Jobs" maximumrecords=10 showallcats=1 /]

Display jobs by categories with a custom title and background color, showing 5 records per page, and displaying only categories with records.

[wpjobportal_jobbycategory title="Hot Jobs" maximumrecords=5 showallcats=0 backgroundcolor="#ff0000" /]

Display jobs by categories with a custom title, border color and title color, showing 15 records per page, and displaying all categories in 4 columns per row.

[wpjobportal_jobbycategory title="Featured Jobs" maximumrecords=15 showallcats=1 columnperrow=4 titlecolor="#000000" bordercolor="#000000" /]

PHP Function Code

In case you have difficulties debugging what causing issues with [wpjobportal_jobbycategory] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('wpjobportal_jobbycategory', array($this, 'show_jobbycategory'));

Shortcode PHP function:

function show_jobbycategory($raw_args, $content = null) {

        ob_start();

        $defaults = array(
            'title' => esc_html(__('Jobs By Categories', 'wp-job-portal')),
            'showtitle' => '1',
            'maximumrecords' => '20',
            'haverecords' => '1',
            'showallcats' => '2',
            'columnperrow' => '3',
            'titlecolor' => '',
            'backgroundcolor' => '',
            'bordercolor' => '',
        );

        $arr = (object) shortcode_atts($defaults, $raw_args);

        wpjobportal::wpjobportal_addStyleSheets();

        $offline = wpjobportal::$_config->getConfigurationByConfigName('offline');
        if ($offline == 1) {
            WPJOBPORTALlayout::getSystemOffline();
        } else {
            $module = WPJOBPORTALrequest::getVar('wpjobportalme');
            if($module != null){
                $pageid = get_the_ID();
                wpjobportal::wpjobportal_setPageID($pageid);
                wpjobportal::wpjobportal_addStyleSheets();
                WPJOBPORTALincluder::include_file($module);
                $content .= ob_get_clean();
                return $content;
            }
            $classname = 'category' . uniqid();

            $color1 = $arr->titlecolor;
            $color2 = $arr->backgroundcolor;
            $color3 = $arr->bordercolor;

            $categories = WPJOBPORTALincluder::getJSModel('job')->getJobsBycategory_Widget($arr->showallcats, $arr->haverecords, $arr->maximumrecords);

            $html = WPJOBPORTALincluder::getJSModel('wpjobportalwidgets')->listModuleByJobcatOrType($categories, $classname, $arr->showtitle, $arr->title, $arr->columnperrow, 2 );
            echo wp_kses($html, WPJOBPORTAL_ALLOWED_TAGS);

            $echo_style = WPJOBPORTALincluder::getJSModel('wpjobportalwidgets')->prepareStyleForBlocks($classname, $color1, $color2, $color3);
            echo wp_kses($echo_style, WPJOBPORTAL_ALLOWED_TAGS);

        }

        $content .= ob_get_clean();
        return $content;
    }

Code file location:

wp-job-portal/wp-job-portal/includes/shortcodes.php

WP Job Portal [wpjobportal_jobbytypes] Shortcode

The WP Job Portal shortcode is designed to display jobs by type on your WordPress site. This shortcode fetches job data based on specified parameters, such as the maximum number of records, and presents it in a neatly formatted layout. It accommodates customization with options for title, colors, and the number of columns per row. In case the system is offline, it displays an appropriate message. If a specific ‘wpjobportalme’ module is set, it includes the corresponding file. The shortcode also ensures to add necessary style sheets for proper display.

Shortcode: [wpjobportal_jobbytypes]

Parameters

Here is a list of all possible wpjobportal_jobbytypes shortcode parameters and attributes:

  • title – sets the title of the job listing section.
  • showtitle – controls if the title is displayed (1) or not (0).
  • maximumrecords – defines the max number of job types to show.
  • haverecords – controls if job types with jobs are shown (1) or not (0).
  • showallcats – controls if all job types are shown (2) or not (1).
  • columnperrow – determines the number of columns per row.
  • titlecolor – sets the color for the title text.
  • backgroundcolor – defines the background color of the section.
  • bordercolor – sets the color for the section border.

Examples and Usage

Basic example – Display a list of jobs by types with the default settings.

[wpjobportal_jobbytypes /]

Advanced examples

Display a list of jobs by types with a custom title, showing 10 records, and having 2 columns per row.

[wpjobportal_jobbytypes title="Top Job Types" maximumrecords="10" columnperrow="2" /]

Display a list of jobs by types with a custom title and colors for the title, background, and border. It will show all categories, even those without records, and display 4 columns per row.

[wpjobportal_jobbytypes title="All Job Types" titlecolor="#000000" backgroundcolor="#ffffff" bordercolor="#cccccc" showallcats="1" columnperrow="4" /]

Display a list of jobs by types without a title, showing only categories with records, and displaying 3 columns per row.

[wpjobportal_jobbytypes showtitle="0" haverecords="1" columnperrow="3" /]

PHP Function Code

In case you have difficulties debugging what causing issues with [wpjobportal_jobbytypes] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('wpjobportal_jobbytypes', array($this, 'show_jobbytypes'));

Shortcode PHP function:

function show_jobbytypes($raw_args, $content = null) {

        ob_start();

        $defaults = array(
            'title' => esc_html(__('Jobs By Types', 'wp-job-portal')),
            'showtitle' => '1',
            'maximumrecords' => '20',
            'haverecords' => '1',
            'showallcats' => '2',
            'columnperrow' => '3',
            'titlecolor' => '',
            'backgroundcolor' => '',
            'bordercolor' => '',
        );

        $arr = (object) shortcode_atts($defaults, $raw_args);

        wpjobportal::wpjobportal_addStyleSheets();
        $offline = wpjobportal::$_config->getConfigurationByConfigName('offline');
        if ($offline == 1) {
            WPJOBPORTALlayout::getSystemOffline();
        } else {
            $module = WPJOBPORTALrequest::getVar('wpjobportalme');
            if($module != null){
                $pageid = get_the_ID();
                wpjobportal::wpjobportal_setPageID($pageid);
                wpjobportal::wpjobportal_addStyleSheets();
                WPJOBPORTALincluder::include_file($module);
                $content .= ob_get_clean();
                return $content;
            }
            $classname = 'jobtype' . uniqid();
            $color1 = $arr->titlecolor;
            $color2 = $arr->backgroundcolor;
            $color3 = $arr->bordercolor;

            $types = WPJOBPORTALincluder::getJSModel('job')->getJobsByTypes_Widget($arr->showallcats, $arr->haverecords, $arr->maximumrecords);

            $html = WPJOBPORTALincluder::getJSModel('wpjobportalwidgets')->listModuleByJobcatOrType($types, $classname, $arr->showtitle, $arr->title, $arr->columnperrow, 1 );
            echo wp_kses($html, WPJOBPORTAL_ALLOWED_TAGS);

            $echo_style = WPJOBPORTALincluder::getJSModel('wpjobportalwidgets')->prepareStyleForBlocks($classname, $color1, $color2, $color3);
            echo wp_kses($echo_style, WPJOBPORTAL_ALLOWED_TAGS);

        }

        $content .= ob_get_clean();
        return $content;
    }

Code file location:

wp-job-portal/wp-job-portal/includes/shortcodes.php

WP Job Portal [wpjobportal_jobstats] Shortcode

The WP Job Portal shortcode is a powerful tool that displays various job statistics on your website. It allows customization of titles, employer, jobseeker, jobs, companies, active jobs, resumes, and daily stats visibility. Furthermore, it enables you to personalize the appearance with title color, background color, and border color. The plugin ensures seamless integration, providing a user-friendly interface for both job seekers and employers.

Shortcode: [wpjobportal_jobstats]

Parameters

Here is a list of all possible wpjobportal_jobstats shortcode parameters and attributes:

  • title – Sets the title of the job stats section
  • showtitle – Determines whether the title is displayed (1 = yes, anything else = no)
  • employer – Controls visibility of the employer count (1 = yes, anything else = no)
  • jobseeker – Controls visibility of the jobseeker count (1 = yes, anything else = no)
  • jobs – Controls visibility of the jobs count (1 = yes, anything else = no)
  • companies – Controls visibility of the companies count (1 = yes, anything else = no)
  • activejobs – Controls visibility of the active jobs count (1 = yes, anything else = no)
  • resumes – Controls visibility of the resumes count (1 = yes, anything else = no)
  • todaystats – Controls visibility of today’s stats (1 = yes, anything else = no)
  • titlecolor – Allows you to set the color of the title
  • backgroundcolor – Allows you to set the background color of the section
  • bordercolor – Allows you to set the border color of the section

Examples and Usage

Basic example – Show job statistics with default settings.

[wpjobportal_jobstats /]

Advanced examples

Display job statistics with a custom title, and hide the title on the front end.

[wpjobportal_jobstats title="My Custom Title" showtitle="0" /]

Show job statistics with a custom title, background color, and border color, but hide the title and the ‘todaystats’ on the front end.

[wpjobportal_jobstats title="My Custom Title" showtitle="0" backgroundcolor="#ff0000" bordercolor="#0000ff" todaystats="0" /]

Show only ’employer’, ‘jobseeker’, and ‘jobs’ statistics with a custom title, background color, and border color.

[wpjobportal_jobstats title="My Custom Title" employer="1" jobseeker="1" jobs="1" companies="0" activejobs="0" resumes="0" todaystats="0" backgroundcolor="#ff0000" bordercolor="#0000ff" /]

Display job statistics with a custom title color.

[wpjobportal_jobstats titlecolor="#00ff00" /]

PHP Function Code

In case you have difficulties debugging what causing issues with [wpjobportal_jobstats] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('wpjobportal_jobstats', array($this, 'show_jobstats'));

Shortcode PHP function:

function show_jobstats($raw_args, $content = null) {

        ob_start();

        $defaults = array(
            'title' => esc_html(__('Stats', 'wp-job-portal')),
            'showtitle' => '1',
            'employer' => '1',
            'jobseeker' => '1',
            'jobs' => '1',
            'companies' => '1',
            'activejobs' => '1',
            'resumes' => '1',
            'todaystats' => '1',
            'titlecolor' => '',
            'backgroundcolor' => '',
            'bordercolor' => '',
        );

        $arr = (object) shortcode_atts($defaults, $raw_args);

        wpjobportal::wpjobportal_addStyleSheets();
        $offline = wpjobportal::$_config->getConfigurationByConfigName('offline');
        if ($offline == 1) {
            WPJOBPORTALlayout::getSystemOffline();
        } else {
            $module = WPJOBPORTALrequest::getVar('wpjobportalme');
            if($module != null){
                $pageid = get_the_ID();
                wpjobportal::wpjobportal_setPageID($pageid);
                wpjobportal::wpjobportal_addStyleSheets();
                WPJOBPORTALincluder::include_file($module);
                $content .= ob_get_clean();
                return $content;
            }
            $classname = 'stats' . uniqid();
            $data = WPJOBPORTALincluder::getJSModel('common')->getJobsStats_Widget($classname, $arr->title, $arr->showtitle, $arr->employer, $arr->jobseeker, $arr->jobs, $arr->companies, $arr->activejobs, $arr->resumes, $arr->todaystats);
            $modules_html = WPJOBPORTALincluder::getJSModel('common')->listModuleJobsStats($classname, $arr->title, $arr->showtitle, $arr->employer, $arr->jobseeker, $arr->jobs, $arr->companies, $arr->activejobs, $arr->resumes, $arr->todaystats,$data);
            echo wp_kses($modules_html, WPJOBPORTAL_ALLOWED_TAGS);

            $color1 = $arr->titlecolor;
            $color2 = $arr->backgroundcolor;
            $color3 = $arr->bordercolor;

            $echo_style = WPJOBPORTALincluder::getJSModel('wpjobportalwidgets')->prepareStyleForStats($classname, $color1, $color2, $color3);
            echo wp_kses($echo_style, WPJOBPORTAL_ALLOWED_TAGS);
        }

        $content .= ob_get_clean();
        return $content;
    }

Code file location:

wp-job-portal/wp-job-portal/includes/shortcodes.php

WP Job Portal [wpjobportal_jobsbycities] Shortcode

The WP Job Portal shortcode ‘wpjobportal_jobsbycities’ displays a list of jobs by cities. It allows customization of title, number of records, columns per row, and colors. . This shortcode retrieves job listings by location and presents them in a widget. It also allows for offline mode and page-specific ID settings.

Shortcode: [wpjobportal_jobsbycities]

Parameters

Here is a list of all possible wpjobportal_jobsbycities shortcode parameters and attributes:

  • title – sets the title of the job listings section
  • showtitle – controls whether the title is displayed (1 for yes, 0 for no)
  • maximumrecords – sets the maximum number of job listings to display
  • haverecords – controls whether to display job listings (1 for yes, 0 for no)
  • columnperrow – sets the number of columns per row in the output
  • titlecolor – sets the color of the title text
  • backgroundcolor – sets the background color of the section
  • bordercolor – sets the color of the border around the section

Examples and Usage

Basic example – Displaying the jobs by cities on your website using the default settings.

[wpjobportal_jobsbycities]

Advanced examples

Displaying jobs by cities with a custom title, showing 10 records, and setting the number of columns per row to 2.

[wpjobportal_jobsbycities title="Top Cities for Jobs" maximumrecords=10 columnperrow=2]

Displaying jobs by cities with a custom title, showing 5 records, with custom title color, background color, and border color.

[wpjobportal_jobsbycities title="Hot Job Locations" maximumrecords=5 titlecolor="#000000" backgroundcolor="#ffffff" bordercolor="#000000"]

Displaying jobs by cities without the title, showing 15 records, and setting the number of columns per row to 4.

[wpjobportal_jobsbycities showtitle=0 maximumrecords=15 columnperrow=4]

PHP Function Code

In case you have difficulties debugging what causing issues with [wpjobportal_jobsbycities] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('wpjobportal_jobsbycities', array($this, 'show_jobsbycity'));

Shortcode PHP function:

function show_jobsbycity($raw_args, $content = null) {

        ob_start();

        $defaults = array(
            'title' => esc_html(__('Jobs by cities', 'wp-job-portal')),
            'showtitle' => '1',
            'maximumrecords' => '20',
            'haverecords' => '1',
            'columnperrow' => '3',
            'titlecolor' => '',
            'backgroundcolor' => '',
            'bordercolor' => '',
        );

        $showjobsby = 1; //for cities

        $arr = (object) shortcode_atts($defaults, $raw_args);
        wpjobportal::wpjobportal_addStyleSheets();
        $offline = wpjobportal::$_config->getConfigurationByConfigName('offline');
        if ($offline == 1) {
            WPJOBPORTALlayout::getSystemOffline();
        } else {
            $module = WPJOBPORTALrequest::getVar('wpjobportalme');
            if($module != null){
                $pageid = get_the_ID();
                wpjobportal::wpjobportal_setPageID($pageid);
                wpjobportal::wpjobportal_addStyleSheets();
                WPJOBPORTALincluder::include_file($module);
                $content .= ob_get_clean();
                return $content;
            }
            if ($showjobsby != 0) {

                $jobs = WPJOBPORTALincluder::getJSModel('job')->getJobsBylocation_Widget($showjobsby, $arr->haverecords, $arr->maximumrecords);

                $classname = 'city' . uniqid();

                $html = WPJOBPORTALincluder::getJSModel('wpjobportalwidgets')->listModuleLocation($jobs, $classname, $arr->showtitle, $arr->title, $arr->columnperrow, $showjobsby);

                echo wp_kses($html, WPJOBPORTAL_ALLOWED_TAGS);

                $color1 = $arr->titlecolor;
                $color2 = $arr->backgroundcolor;
                $color3 = $arr->bordercolor;

                $echo_style = WPJOBPORTALincluder::getJSModel('wpjobportalwidgets')->prepareStyleForBlocks($classname, $color1, $color2, $color3);

                echo wp_kses($echo_style, WPJOBPORTAL_ALLOWED_TAGS);

            }
        }

        $content .= ob_get_clean();
        return $content;
    }

Code file location:

wp-job-portal/wp-job-portal/includes/shortcodes.php

WP Job Portal [wpjobportal_jobsbystate] Shortcode

The WP Job Portal shortcode ‘wpjobportal_jobsbystate’ displays a list of jobs by state. It allows customization of title, number of records, columns per row, and color scheme. This shortcode checks if the site is offline. If not, it fetches jobs based on the location and displays them in a widget format. It also applies unique styles to each block.

Shortcode: [wpjobportal_jobsbystate]

Parameters

Here is a list of all possible wpjobportal_jobsbystate shortcode parameters and attributes:

  • title – Defines the title of the job listing section
  • showtitle – Controls whether the title is displayed (1) or not (0)
  • maximumrecords – Sets the maximum number of job listings displayed
  • haverecords – Determines if there are records to display (1) or not (0)
  • columnperrow – Defines the number of columns per row in the job listings layout
  • titlecolor – Sets the color of the title text
  • backgroundcolor – Sets the background color of the job listings section
  • bordercolor – Defines the color of the border surrounding the job listings section

Examples and Usage

Basic example – Displays jobs by state with default attributes.

[wpjobportal_jobsbystate /]

Advanced examples

Displays jobs by state with a custom title and maximum of 10 records.

[wpjobportal_jobsbystate title="Jobs in Your State" maximumrecords="10" /]

Displays jobs by state with a custom title, maximum of 10 records, and 2 columns per row.

[wpjobportal_jobsbystate title="Jobs in Your State" maximumrecords="10" columnperrow="2" /]

Displays jobs by state with a custom title, maximum of 10 records, 2 columns per row, and custom colors for title, background, and border.

[wpjobportal_jobsbystate title="Jobs in Your State" maximumrecords="10" columnperrow="2" titlecolor="#000000" backgroundcolor="#FFFFFF" bordercolor="#CCCCCC" /]

Displays jobs by state with a custom title, maximum of 10 records, 2 columns per row, custom colors for title, background, and border, and hides the title.

[wpjobportal_jobsbystate title="Jobs in Your State" showtitle="0" maximumrecords="10" columnperrow="2" titlecolor="#000000" backgroundcolor="#FFFFFF" bordercolor="#CCCCCC" /]

PHP Function Code

In case you have difficulties debugging what causing issues with [wpjobportal_jobsbystate] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('wpjobportal_jobsbystate', array($this, 'show_jobsbystate'));

Shortcode PHP function:

function show_jobsbystate($raw_args, $content = null) {

        ob_start();

        $defaults = array(
            'title' => esc_html(__('Jobs by state', 'wp-job-portal')),
            'showtitle' => '1',
            'maximumrecords' => '20',
            'haverecords' => '1',
            'columnperrow' => '3',
            'titlecolor' => '',
            'backgroundcolor' => '',
            'bordercolor' => '',
        );

        $showjobsby = 2; //for state

        $arr = (object) shortcode_atts($defaults, $raw_args);

        wpjobportal::wpjobportal_addStyleSheets();
        $offline = wpjobportal::$_config->getConfigurationByConfigName('offline');
        if ($offline == 1) {
            WPJOBPORTALlayout::getSystemOffline();
        } else {
            $module = WPJOBPORTALrequest::getVar('wpjobportalme');
            if($module != null){
                $pageid = get_the_ID();
                wpjobportal::wpjobportal_setPageID($pageid);
                wpjobportal::wpjobportal_addStyleSheets();
                WPJOBPORTALincluder::include_file($module);
                $content .= ob_get_clean();
                return $content;
            }
            $jobs = '';
            if ($showjobsby != 0) {

                $jobs = WPJOBPORTALincluder::getJSModel('job')->getJobsBylocation_Widget($showjobsby, $arr->haverecords, $arr->maximumrecords);

                $classname = 'state' . uniqid();

                $html = WPJOBPORTALincluder::getJSModel('wpjobportalwidgets')->listModuleLocation($jobs, $classname, $arr->showtitle, $arr->title, $arr->columnperrow, $showjobsby);

                echo wp_kses($html, WPJOBPORTAL_ALLOWED_TAGS);

                $color1 = $arr->titlecolor;
                $color2 = $arr->backgroundcolor;
                $color3 = $arr->bordercolor;

                $echo_style = WPJOBPORTALincluder::getJSModel('wpjobportalwidgets')->prepareStyleForBlocks($classname, $color1, $color2, $color3);

                echo wp_kses($echo_style, WPJOBPORTAL_ALLOWED_TAGS);
            }
        }

        $content .= ob_get_clean();
        return $content;
    }

Code file location:

wp-job-portal/wp-job-portal/includes/shortcodes.php

WP Job Portal [wpjobportal_jobsbycountries] Shortcode

The WP Job Portal shortcode is designed to display job listings by country. It generates a widget that sorts available jobs according to their location. This shortcode has various attributes such as ‘title’, ‘showtitle’, ‘maximumrecords’, etc. These allow customization of the widget’s appearance and functionality, including the number of records displayed, the number of columns per row, and color schemes. The shortcode also includes offline functionality, allowing the system to display a system offline message when necessary. Finally, it uses the WP Job Portal API to fetch job data, ensuring that the displayed jobs are always up-to-date.

Shortcode: [wpjobportal_jobsbycountries]

Parameters

Here is a list of all possible wpjobportal_jobsbycountries shortcode parameters and attributes:

  • title – Defines the title of the job listing section
  • showtitle – Determines if the title will be displayed or not
  • maximumrecords – Sets the maximum number of job listings to display
  • haverecords – Indicates if there are job listings to display
  • columnperrow – Sets the number of job listings displayed per row
  • titlecolor – Allows to change the color of the title
  • backgroundcolor – Allows to change the background color of the section
  • bordercolor – Allows to change the color of the border

Examples and Usage

Basic example – Display a list of jobs by countries with the default settings

[wpjobportal_jobsbycountries]

Advanced examples

A shortcode that displays a list of jobs by countries with a custom title, and showing a maximum of 10 records.

[wpjobportal_jobsbycountries title="Top 10 Jobs by Country" maximumrecords="10"]

A shortcode that displays a list of jobs by countries with a custom title, showing a maximum of 10 records, and styled with custom colors for the title, background, and border.

[wpjobportal_jobsbycountries title="Top 10 Jobs by Country" maximumrecords="10" titlecolor="#000000" backgroundcolor="#ffffff" bordercolor="#cccccc"]

A shortcode that displays a list of jobs by countries in two columns, with a custom title, showing a maximum of 20 records, and styled with custom colors for the title, background, and border.

[wpjobportal_jobsbycountries title="Top 20 Jobs by Country" maximumrecords="20" columnperrow="2" titlecolor="#000000" backgroundcolor="#ffffff" bordercolor="#cccccc"]

PHP Function Code

In case you have difficulties debugging what causing issues with [wpjobportal_jobsbycountries] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('wpjobportal_jobsbycountries', array($this, 'show_jobsbycountries'));

Shortcode PHP function:

function show_jobsbycountries($raw_args, $content = null) {

        ob_start();

        $defaults = array(
            'title' => esc_html(__('Jobs by countries', 'wp-job-portal')),
            'showtitle' => '1',
            'maximumrecords' => '20',
            'haverecords' => '1',
            'columnperrow' => '3',
            'titlecolor' => '',
            'backgroundcolor' => '',
            'bordercolor' => '',
        );

        $showjobsby = 3; //for countries

        $arr = (object) shortcode_atts($defaults, $raw_args);

        wpjobportal::wpjobportal_addStyleSheets();
        $offline = wpjobportal::$_config->getConfigurationByConfigName('offline');
        if ($offline == 1) {
            WPJOBPORTALlayout::getSystemOffline();
        } else {
            $module = WPJOBPORTALrequest::getVar('wpjobportalme');
            if($module != null){
                $pageid = get_the_ID();
                wpjobportal::wpjobportal_setPageID($pageid);
                wpjobportal::wpjobportal_addStyleSheets();
                WPJOBPORTALincluder::include_file($module);
                $content .= ob_get_clean();
                return $content;
            }
            $jobs = '';
            if ($showjobsby != 0) {

                $jobs = WPJOBPORTALincluder::getJSModel('job')->getJobsBylocation_Widget($showjobsby, $arr->haverecords, $arr->maximumrecords);

                $classname = 'country' . uniqid();

                $html = WPJOBPORTALincluder::getJSModel('wpjobportalwidgets')->listModuleLocation($jobs, $classname, $arr->showtitle, $arr->title, $arr->columnperrow, $showjobsby);

                echo wp_kses($html, WPJOBPORTAL_ALLOWED_TAGS);

                $color1 = $arr->titlecolor;
                $color2 = $arr->backgroundcolor;
                $color3 = $arr->bordercolor;

                $echo_style = WPJOBPORTALincluder::getJSModel('wpjobportalwidgets')->prepareStyleForBlocks($classname, $color1, $color2, $color3);

                echo wp_kses($echo_style, WPJOBPORTAL_ALLOWED_TAGS);
            }
        }

        $content .= ob_get_clean();
        return $content;
    }

Code file location:

wp-job-portal/wp-job-portal/includes/shortcodes.php

WP Job Portal [wpjobportal_jobsonmap] Shortcode

The WP Job Portal shortcode ‘wpjobportal_jobsonmap’ displays a map with hot job listings. It adjusts parameters like title, number of jobs, company, and category. The shortcode also includes offline mode support, map zoom level, and module height customizability. It fetches the newest job listings for the map and presents them in an organized list.

Shortcode: [wpjobportal_jobsonmap]

Parameters

Here is a list of all possible wpjobportal_jobsonmap shortcode parameters and attributes:

  • title – sets the title of the job map widget
  • showtitle – controls the visibility of the title (1 to show, 0 to hide)
  • numberofjobs – determines the number of jobs to display on the map
  • company – controls the visibility of the company name (1 to show, 0 to hide)
  • category – controls the visibility of the job category (1 to show, 0 to hide)
  • moduleheight – sets the height of the map widget in pixels
  • mapzoom – sets the default zoom level of the map

Examples and Usage

Basic example – Displaying the default jobs on the map with the title “Hot Jobs”.

[wpjobportal_jobsonmap /]

Advanced examples

Displaying 30 jobs on the map with the title “Latest Jobs” and showing company and category information. The map module height is set to 400 and the map zoom level is set to 12.

[wpjobportal_jobsonmap title="Latest Jobs" numberofjobs=30 company=1 category=1 moduleheight=400 mapzoom=12 /]

Displaying 50 jobs on the map without the title, and not showing company and category information. The map module height is set to 500 and the map zoom level is set to 15.

[wpjobportal_jobsonmap showtitle=0 numberofjobs=50 company=0 category=0 moduleheight=500 mapzoom=15 /]

Displaying jobs on the map with a custom title “Tech Jobs” and showing only the company information. The map module height is set to 350 and the map zoom level is set to 10.

[wpjobportal_jobsonmap title="Tech Jobs" company=1 category=0 moduleheight=350 mapzoom=10 /]

PHP Function Code

In case you have difficulties debugging what causing issues with [wpjobportal_jobsonmap] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('wpjobportal_jobsonmap', array($this, 'show_jobsonmap'));

Shortcode PHP function:

function show_jobsonmap($raw_args, $content = null) {

        ob_start();

        $defaults = array(
            'title' => esc_html(__('Hot jobs', 'wp-job-portal')),
            'showtitle' => 1,
            'numberofjobs' => 20,
            'company' => 1,
            'category' => 1,
            'moduleheight' => 300,
            'mapzoom' => 10,
        );

        $arr = (object) shortcode_atts($defaults, $raw_args);

        wpjobportal::wpjobportal_addStyleSheets();
        $offline = wpjobportal::$_config->getConfigurationByConfigName('offline');
        if ($offline == 1) {
            WPJOBPORTALlayout::getSystemOffline();
        } else {
            $module = WPJOBPORTALrequest::getVar('wpjobportalme');
            if($module != null){
                $pageid = get_the_ID();
                wpjobportal::wpjobportal_setPageID($pageid);
                wpjobportal::wpjobportal_addStyleSheets();
                WPJOBPORTALincluder::include_file($module);
                $content .= ob_get_clean();
                return $content;
            }
            $jobs = WPJOBPORTALincluder::getJSModel('job')->getNewestJobsForMap_Widget($arr->numberofjobs);
            $html = WPJOBPORTALincluder::getJSModel('wpjobportalwidgets')->listModuleJobsForMap($jobs, $arr->title, $arr->showtitle, $arr->company, $arr->category, $arr->moduleheight, $arr->mapzoom);
            echo wp_kses($html, WPJOBPORTAL_ALLOWED_TAGS);
        }

        $content .= ob_get_clean();
        return $content;
    }

Code file location:

wp-job-portal/wp-job-portal/includes/shortcodes.php

Conclusion

Now that you’ve learned how to embed the WP Job Portal Plugin shortcodes, understood the parameters, and seen code examples, it’s easy to use and debug any issue that might cause it to ‘not work’. If you still have difficulties with it, don’t hesitate to leave a comment below.

Comments

Leave a Reply

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