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](https://ps.w.org/wp-job-manager-companies/assets/icon-256x256.png?rev=1488481)
"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."
- [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.
Leave a Reply