Display a taxonomy term every number of rows I have a view with Infinite Scroll Pager giving me the latest products of the website.

Every taxonomy term has an image attatched on it.

I want to display taxonomy terms every 3 rows of products.
I think you must alter the view.


Create the views normally, add taxo to every rows.
Use the Hook hook_views_pre_render(&amp;$view)
Delete the term for every rows except 1/3.


For example something like this:

function MYMODULE_views_pre_render(&amp;$view) {
  if ($view-&gt;name == 'view_myviewname') {
    $result = $view-&gt;result;
    $count = 0;
    foreach ($result as $i =&gt; $row) {
      if(!$count % 3){
        unset($view-&gt;result[$i]-&gt;field_MYTEXONOMYFIELD[0]);
      }
      $count++;
    }
  }
}


Example from : http://www.drupal8.ovh/en/tutoriels/238/alter-a-view-edit-view-result-programmatically