Snippets: Change Related Portfolio Query Arguments

// Change Related Portfolio Query Arguments
function my_custom_related_blog_posts_query( $args ) {

    // Remove tax_query parameter so it doesn't try and display items from the same category
    $args['tax_query'] = NULL;

    // Change orderby parameter from random to date
    $args['orderby'] = 'date';

    // Return args
    return $args;

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