[else] is part of the s2If conditionals. https://s2member.com/kb-article/s2if-simple-shortcode-conditionals/#toc-0c08ab81
[s2If has_tag(gratis|{gratis})]
The article shows has_tag(slug|{slug,slug}) because you can optionally check many slugs, like has_tag(reg|blue), the pipe | is an OR.
The styling is working, but I don’t know why the “else” part isn’t working…
Yeah, that’s odd… Did you test the else with other condition? is the “else” not working for you with any condition?
Another option is:
[s2If has_tag(gratis)]
<p class="freelabel">Free</p>
[/s2If]
[s2If !has_tag(gratis)]
<p class="paidlabel">Paid</p>
[/s2If]
The prefixed/indented _s2If is for when you use it inside another s2If.
[else]
[_s2If !has_tag(gratis)]
You can do that, but it’s not needed in this case.
The second block ignores the logic (it’s copying the first block’s code), but retains the new 5px margin.
So you’re seeing the HTML affecting the behavior of the s2If? That’s really weird…
So if you do Solo Miembros or <div class"paidlabel">Solo Miembros</div> s2If does what you expect, but with <div class"paidlabel" style="margin-bottom:5px;">Solo Miembros</div> it doesn’t?
I don’t know why/how it’d affect the shortcode, but if with just the class it works, then use the class to select and style it without the style directly in the tag.
