Snippets: Disable Portfolio Related Columns Responsiveness

function my_portfolio_related_entry_classes( $classes ) {
	if ( is_singular( 'portfolio' ) && in_array( 'loop-related', $classes ) ) {
		unset( $classes['col'] );
		if ( ( $key = array_search( 'col', $classes ) ) !== false ) {
			unset( $classes[$key] );
		}
		$classes[] = 'nr-col';
	}
	return $classes;
}
add_filter( 'post_class', 'my_portfolio_related_entry_classes' );

Version Required:3.4.1+

Snippet Type: PHP

Posted Under: Portfolio

All PHP snippets should be added via a child theme's functions.php file.