skip to Main Content

Conditionally Alter Portfolio Post Grid Links

function myprefix_vcex_shortcode_loop_atts( $atts ) {

	// Target portfolio grid
	if ( isset( $atts['base'] )
		&& 'vcex_portfolio_grid' == $atts['base']
	) {
		$atts['post_permalink'] = 'http://www.wpexplorer.com/';
	}

	// 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)
Back To Top