I have this code in my liquid file:
{% assign beatles = article.content | split: "</p>" %}
{% for member in beatles %}
{{ member }}
{% endfor %}
What I am trying to do is insert content every 2nd, 4th, 6th paragraph.
How do I do this, I understand I can get content from the array using {{ member[2] }} for example, but how do I then insert content after this paragraph?
2
Answers
Found out a way to do this. Within the for loop I needed to add
etc. Hope that helps others.
I hope this code helps: