• Hi,
    I love your plugin. However, I just detected an issue in my WordPress.
    Let’s say I have this structure:
    [CBC show=”y” country=”us” html=”none”]
    2 lines of content
    [/CBC]
    [CBC show=”y” country=”co” html=”none”]
    2 lines of content
    [/CBC]
    [CBC show=”y” country=”mx” html=”none”]
    2 lines of content
    [/CBC]
    [CBC show=”n” country=”mx” html=”none”]
    2 lines of content
    [/CBC]

    Let’s say we are in Spain. It should only show the last CBC box. That’s what it does. However, the first 3 boxes give some
    lines in the HTML.

    That’s annoying, because a huge empty space appears.

    Can you help me, please? Thanks!

    https://wordpress.org/plugins/custom-content-by-country/

Viewing 1 replies (of 1 total)
  • Thread Starter letrasdecorativas

    (@letrasdecorativas)

    In case somebody else has the same problem, I figured out a very simple solution.
    The problem with the code is that WordPress (or the plugin, I don’t know) was inserting
    line breaks on every [CBC] that wasn’t suposed to show up.
    I found a solution somewhere, and it’s as simple as inserting an empty line in between [CBC]s. So in the example above I just changed it to:
    [CBC show=”y” country=”us” html=”none”]
    2 lines of content
    [/CBC]

    [CBC show=”y” country=”co” html=”none”]
    2 lines of content
    [/CBC]

    [CBC show=”y” country=”mx” html=”none”]
    2 lines of content
    [/CBC]

    [CBC show=”n” country=”mx” html=”none”]
    2 lines of content
    [/CBC]

    And it worked!

Viewing 1 replies (of 1 total)
  • The topic ‘Empty lines’ is closed to new replies.