Team Builder Member Showcase Shortcode

Below, you’ll find a detailed guide on how to add the Team Builder Member Showcase 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 Team Builder Member Showcase Plugin shortcode not to show or not to work correctly.

Before starting, here is an overview of the Team Builder Member Showcase Plugin and the shortcodes it provides:

Plugin Icon
Team Builder Member Showcase – Team Slider, Team Grid Design

"Team Builder Member Showcase is a powerful WordPress plugin designed to create stunning team sliders and grid designs. Perfect for showcasing your team's skills and talents."

★★★★☆ (3) Active Installs: 2000+ Tested with: 6.3.2 PHP Version: 7.2
Included Shortcodes:
  • [TBMS]

Team Builder Member Showcase [TBMS] Shortcode

The Team Builder Member Showcase (TBMS) shortcode is a versatile tool for displaying team members on a WordPress site. It fetches data, enqueues necessary scripts, and styles, and applies settings from the post meta. Based on the settings, it alters the template design, image size, column count, background color, description color, link behavior, and custom CSS. It also includes specific template files based on the chosen design. Shortcode: [TBMS]

Shortcode: [TBMS]

Parameters

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

  • id – Unique ID linked to the specific team member post.

Examples and Usage

Basic example – Display a team member showcase by specifying the post ID.

[TBMS id=1 /]

Advanced examples

Display a team member showcase by specifying the post ID and customizing the template design, image size, total column, background team color, description color, link tab, and custom CSS.

[TBMS id=1 tbms_template_design="template2" tbms_image_size="medium" tbms_total_column="3" tbms_background_team_color="#000000" tbms_decription_color="#ffffff" tbms_link_tab="_self" tbms_custom_css="custom-css-class" /]

In this advanced shortcode example, we are customizing the team member showcase by specifying various parameters. The ‘tbms_template_design’ parameter is used to select the template design, ‘tbms_image_size’ to set the image size, ‘tbms_total_column’ to define the number of columns, ‘tbms_background_team_color’ to set the background color of the team, ‘tbms_decription_color’ to set the color of the description, ‘tbms_link_tab’ to specify the link tab, and ‘tbms_custom_css’ to add custom CSS class.

PHP Function Code

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

Shortcode line:

add_shortcode( 'TBMS', 'tbms_shortcode' );

Shortcode PHP function:

function tbms_shortcode( $post_id ) {

	ob_start();
	$tbms_post_settings = get_post_meta( $post_id['id'], 'tbms_post_data_' . $post_id['id'], true );

	$tbms_post_id = $post_id['id'];

	// fetch all Team
	$tbms_post_data = array(
		'p'         => $tbms_post_id,
		'post_type' => 'tbms_cpt_name',
		'orderby'   => 'ASC',
	);
	$tbms_loop      = new WP_Query( $tbms_post_data );

	wp_enqueue_script( 'awplife-tbms-bootstrap-js', TBMS_PLUGIN_URL . 'assets/js/bootstrap.js', array( 'jquery' ), '', false );
	wp_enqueue_style( 'awplife-tbms-bootstrap-css', TBMS_PLUGIN_URL . 'assets/css/tbms-frontend-bootstrap.css' );
	wp_enqueue_style( 'awplife-tbms-font-awesome-css', TBMS_PLUGIN_URL . 'assets/css/font-awesome.css' );

	// post Setting
	if ( isset( $tbms_post_settings['tbms_template_design'] ) ) {
		$tbms_template_design = $tbms_post_settings['tbms_template_design'];
	} else {
		$tbms_template_design = 'template1';
	}
	if ( isset( $tbms_post_settings['tbms_image_size'] ) ) {
		$tbms_image_size = $tbms_post_settings['tbms_image_size'];
	} else {
		$tbms_image_size = 'medium';
	}
	if ( isset( $tbms_post_settings['tbms_total_column'] ) ) {
		$tbms_total_column = $tbms_post_settings['tbms_total_column'];
	} else {
		$tbms_total_column = '';
	}
	if ( isset( $tbms_post_settings['tbms_background_team_color'] ) ) {
		$tbms_background_team_color = $tbms_post_settings['tbms_background_team_color'];
	} else {
		$tbms_background_team_color = '#34495e';
	}
	if ( isset( $tbms_post_settings['tbms_decription_color'] ) ) {
		$tbms_decription_color = $tbms_post_settings['tbms_decription_color'];
	} else {
		$tbms_decription_color = '#ffffff';
	}
	if ( isset( $tbms_post_settings['tbms_link_tab'] ) ) {
		$tbms_link_tab = $tbms_post_settings['tbms_link_tab'];
	} else {
		$tbms_link_tab = '_blank';
	}
	if ( isset( $tbms_post_settings['tbms_custom_css'] ) ) {
		$tbms_custom_css = $tbms_post_settings['tbms_custom_css'];
	} else {
		$tbms_custom_css = '';
	}
	include 'include/non-carousel/no-owl-shotcode.php';
	if ( $tbms_template_design == 'template1' ) {
		$template_number = 'template1';
		include 'assets/css/template1.php'; }
	if ( $tbms_template_design == 'template2' ) {
		$template_number = 'template2';
		include 'assets/css/template2.php'; }
	if ( $tbms_template_design == 'template3' ) {
		$template_number = 'template3';
		include 'assets/css/template3.php'; }
	if ( $tbms_template_design == 'template4' ) {
		$template_number = 'template4';
		include 'assets/css/template4.php'; }
	?>
<style>	
	<?php echo $tbms_custom_css; ?>
</style>	
	<?php
	wp_reset_query();
	return ob_get_clean();
}

Code file location:

team-builder-member-showcase/team-builder-member-showcase/shotcode.php

Conclusion

Now that you’ve learned how to embed the Team Builder Member Showcase 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 *