WP Job Openings Shortcode

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

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

Plugin Icon
WP Job Openings – Job Listing, Career Page and Recruitment Plugin

"WP Job Openings is a comprehensive WordPress plugin for managing job listings and creating an efficient career page. Ideal for recruitment and HR needs."

★★★★☆ (130) Active Installs: 30000+ Tested with: 6.3.2 PHP Version: 5.6
Included Shortcodes:
  • [awsmjobs]

Wp Job Openings [awsmjobs] Shortcode

The WP-Job-Openings plugin shortcode, ‘awsmjobs’, dynamically generates a list of job openings. It enables the customization of job listings per page, pagination style, and more.

Shortcode: [awsmjobs]

Parameters

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

  • uid – Unique identifier for each job listing.
  • filters – Controls the visibility of job filter options.
  • listings – Determines the number of job listings per page.
  • loadmore – Enables the ‘Load More’ button for job listings.
  • pagination – Sets the style of pagination for job listings.
  • specs – Allows custom specifications for job listings.

Examples and Usage

Basic example – Utilize the shortcode to display job listings with default parameters.

[awsmjobs /]

Advanced examples

Modify the shortcode to display job listings without filters. This is beneficial when you want to present all job listings without any categorization or sorting.

[awsmjobs filters="no" /]

Customize the shortcode to display a specific number of job listings per page. This can be helpful when you want to limit the number of job listings displayed at a time.

[awsmjobs listings="5" /]

Use the shortcode to display job listings with a traditional pagination style. This can be useful when you want to provide a more familiar navigation experience for users.

[awsmjobs pagination="traditional" /]

Employ the shortcode to display job listings without a “load more” button. This is advantageous when you want to display all job listings on one page without the need for additional user interaction.

[awsmjobs loadmore="no" /]

PHP Function Code

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

Shortcode line:

add_shortcode( 'awsmjobs', array( $this, 'awsm_jobs_shortcode' ) );

Shortcode PHP function:

function awsm_jobs_shortcode( $atts ) {
		if ( ! function_exists( 'awsm_jobs_query' ) ) {
			return;
		}

		/**
		 * Filters the shortcode attributes and their defaults.
		 *
		 * @since 1.6.0
		 *
		 * @param array $pairs List of supported attributes and their defaults.
		 */
		$pairs          = apply_filters(
			'awsm_jobs_shortcode_defaults',
			array(
				'uid'        => $this->unique_listing_id,
				'filters'    => get_option( 'awsm_enable_job_filter_listing' ) !== 'enabled' ? 'no' : 'yes',
				'listings'   => get_option( 'awsm_jobs_list_per_page' ),
				'loadmore'   => 'yes',
				'pagination' => get_option( 'awsm_jobs_pagination_type', 'modern' ),
				'specs'      => '',
			)
		);
		$shortcode_atts = shortcode_atts( $pairs, $atts, 'awsmjobs' );

		$this->unique_listing_id++;

		ob_start();
		include self::get_template_path( 'job-openings-view.php' );
		$content = ob_get_clean();

		/**
		 * Filters the shortcode output content.
		 *
		 * @since 1.6.0
		 *
		 * @param string $content Shortcode content.
		 * @param array $shortcode_atts Combined and filtered shortcode attribute list.
		 */
		return apply_filters( 'awsm_jobs_shortcode_output_content', $content, $shortcode_atts );
	}

Code file location:

wp-job-openings/wp-job-openings/wp-job-openings.php

Conclusion

Now that you’ve learned how to embed the Wp Job Openings Plugin shortcode, 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 *