Skip to content

Snippet: Change Portfolio Grid VC Module To Use Tags for “Show Categories” setting

function myprefix_vcex_shortcode_loop_atts( $atts ) {
	
	// Target portfolio grid
	if ( isset( $atts['base'] )
		&& 'vcex_portfolio_grid' == $atts['base']
	) {

		$atts['show_categories_tax'] = 'portfolio_tag';

	}

	// very important
	return $atts;

}
add_filter( 'vcex_shortcode_loop_atts', 'myprefix_vcex_shortcode_loop_atts' );
All PHP snippets should be added via child theme's functions.php file or via a plugin. We recommend Code Snippets (100% Free) or WPCode (sponsored)
Back To Top