I've seen a few answers here on this but can't seem to make it work.

I have a set of repeatable HTML like this:

```
<div id="content">

<article>
<div>
<article>
<div>
<article>
<div>
<article>
<div>
<article>
<div>
<article>
<div>

</div>

```

Etc. this goes on infinitely based on the number of entries.

What I want to do is wrap every three sets of articles/divs in a div. So I would have:

```
<div id="content">

<div class="wrap">
<article>
<div>
<article>
<div>
<article>
<div>
</div>

<div class="wrap">
<article>
<div>
<article>
<div>
<article>
<div>
</div>

</div>

```

I'm sure this is something easy, but for some reason I can't get it to work. Any and all help much appreciated!