Snippets: Show Related Portfolio Items By Date Not Random

function myprefix_related_portfolio_query( $args ) {
	// Change order from random to date
	$args['orderby'] = 'date';
	// Return args
	return $args;
}
add_filter( 'wpex_related_portfolio_args', 'myprefix_related_portfolio_query' );
All PHP snippets should be added via a child theme's functions.php file.