How do I use divisibleby() in a for loop to display two columns?
Instead of using the divisibleby-function you can use the batch-filter:

{% for row in entriesInYear|batch(2) %}
&lt;div class="row"&gt;
    {% for entry in row %}
        &lt;div class="block_txt"&gt;&lt;/div&gt;
    {% endfor %}
&lt;/div&gt;
{% endfor %}


If you have 3 entries in entriesInYear this code would output:

&lt;div class="row"&gt;
   &lt;div class="block_txt"&gt;&lt;/div&gt;
   &lt;div class="block_txt"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="row"&gt;
   &lt;div class="block_txt"&gt;&lt;/div&gt;
&lt;/div&gt;