team_grid_nth_item

You can display custom HTML after nth item on grid by filter hook as follows

function team_grid_nth_item($position){

    if($position==3){

        if(wp_is_mobile()):

            // display HTML on mobile device

        else:

          // display HTML on desktop device
        endif;

        ?>

        <?php

    }
}


add_action('team_grid_nth_item','team_grid_nth_item');