Snippets: Create Unique Sidebar Template Files

/**
 * Display different sidebar templates for your site
 * Requires Total 2.0.3 or greater
 */
function my_wpex_get_sidebar_template( $template ) {

	// Display sidebar-cars.php for your "cars" custom post type
	if ( is_singular( 'cars' ) || is_post_type_archive( 'cars' ) ) {
		$template = 'cars'; // Don't forget to create your sidebar-cars.php file in your child theme
	}

	// Return template
	return $template;

}
add_filter( 'wpex_get_sidebar_template', 'my_wpex_get_sidebar_template' );
All PHP snippets should be added via a child theme's functions.php file.