s2If current_user_is creates unwanted <br> tags

Hi

Hoping someone can help with this -

I have a bunch of conditional statements like -

[s2If current_user_is(s2member_level2)]
link
[/s2If]
[s2If current_user_is(s2member_level3)]
link
[/s2If]
[s2If current_user_is(s2member_level4)]
link
[/s2If]

The problem is if for example I sign in as level 4, it leaves 2 unwanted breaks within a p tag like -

<p style="text-align: left;">
<br>
<br>
</p>

I can sort of understand why it’s doing it but not sure on the solution. Any one any ideas on a solution for this?

Thanks!

I think it’s actually caused by WordPress’s autop function. Just put everything in one line to avoid the problem.

Thanks for the reply, sorry might be a stupid question but what do you mean by put it all on one line? As in -

[s2If current_user_is(s2member_level2)]link[/s2If][s2If current_user_is(s2member_level3)]link[/s2If][s2If current_user_is(s2member_level4)]link[/s2If]

?

If so that doesn’t seem to help.

That is indeed what I meant. It works for me. Obviously, there’s something else going on with your site, presumably caused by your theme.

You will need to use the browser inspector tools (hit F12 and choose Inspector) to see what selectors you might tweak with CSS.