SyntaxFix
Write A Post
Hire A Developer
Questions
You want your if check to be:
if
{% if not loop.last %} , {% endif %}
Note that you can also shorten the code by using If Expression:
{{ ", " if not loop.last else "" }}