• Resolved gvnet

    (@gvnet)


    Just wondering if there is a way to prevent a line break from appearing when a shortcode does not render a value?

    i.e. If my shortcode is:

    [groups_member group=”abc”]This is the content[/groups_member]

    And the person is not in group ABC, I do not want <br> tags to appear, as it pushes content out of alignment.

    Is this possible?

    Many thanks!

Viewing 1 replies (of 1 total)
  • Plugin Author Kento

    (@proaktion)

    Hi,

    In case this is still relevant, I’ve done a quick test using the block editor. If I put the shortcode in a “Shortcode” or a “Paragraph” block, it doesn’t render any <br> – tested with WordPress 5.6.

    If you’re using the classic editor, I guess you’ll need to stick things together to avoid those <br> – ugly but would be effective.

    Cheers

Viewing 1 replies (of 1 total)
  • The topic ‘Prevent line break’ is closed to new replies.