WP Job Manager Shortcode

Below, you’ll find a detailed guide on how to add the WP Job Manager – Company Profiles 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 Manager – Company Profiles Plugin shortcode not to show or not to work correctly.

Before starting, here is an overview of the WP Job Manager – Company Profiles Plugin and the shortcodes it provides:

Plugin Icon
WP Job Manager – Company Profiles

"WP Job Manager – Company Profiles is a robust WordPress plugin that enables you to efficiently manage and showcase detailed company profiles. Ideal for job portals and professional networking sites."

★★✩✩✩ (17) Active Installs: 5000+ Tested with: 6.3.2 PHP Version: false
Included Shortcodes:
  • [job_manager_companies]

WP Job Manager – Company Profiles [job_manager_companies] Shortcode

The ‘job_manager_companies’ shortcode from the wp-job-manager-companies plugin enables a Masonry layout for company archives. It arranges company groups into an optimal grid, improving website aesthetics.

Shortcode: [job_manager_companies]

Examples and Usage

Basic example – The basic usage of the shortcode displays the companies overview with the default setting of showing letters.

[job_manager_companies]

Advanced examples

Using the shortcode to hide the letters in the companies overview. The ‘show_letters’ attribute is set to ‘false’ to achieve this.

[job_manager_companies show_letters=false]

Using the shortcode to show the letters in the companies overview. The ‘show_letters’ attribute is set to ‘true’ to achieve this. This is the same as the default setting, so it’s not necessary to include the attribute unless you want to make it clear in the code.

[job_manager_companies show_letters=true]

PHP Function Code

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

Shortcode line:

add_shortcode( 'job_manager_companies', array( $this, 'shortcode' ) );

Shortcode PHP function:

function shortcode( $atts ) {
		$atts = shortcode_atts( array(
			'show_letters' => true
		), $atts );

		wp_enqueue_script( 'jquery-masonry' );
	?>

		<script type="text/javascript">
		jQuery(function($) {
			$('.companies-overview').masonry({
				itemSelector : '.company-group',
				isFitWidth   : true
			});
		});
		</script>
	<?php

		return $this->build_company_archive( $atts );
	}

Code file location:

wp-job-manager-companies/wp-job-manager-companies/wp-job-manager-companies.php

Conclusion

Now that you’ve learned how to embed the WP Job Manager – Company Profiles 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 *