I am trying to include some (I don’t yet know how many) blog posts on the home page. I would like to have a few posts, then some other information in between, and then some more posts. What I’ve tried in my home.php template is this:
I think the code here could get repetitive, always including the whole bit in between <article> and </article>. So I’ve been trying to put this in a snippet.
However, that doesn’t work. The error I get is: Undefined variable: article
Is there a way to set this up as a snippet? I’ don’t know how I could define $article in the snippet without having to duplicate the code that selects the set of articles.