The example uses <If loop..> to check if the post has a specific category. It creates a taxonomy term loop with the current post and the matching category name.
Inside the loop, create a list of post tags associated with the current post.
<List name=tags>
<Loop taxonomy=tag post=current>
<Item><Field name /></Item>
</Loop>
</List>
Check if the list includes a matching term.
<If list=tags includes value=tag-1>
Yes
<Else />
No
</If>
for some reason, the initial images do not show if I add the code
Not sure why the shorter version with If loop is not working there. It sounds like it’s affecting the parent post loop. I’ve made a note to look into it.