• Resolved Andreas_HGW

    (@andreas_hgw)


    Hello

    I use the timed content pluin to show meeting dates for specific time.
    There are several dates to see, each in one line. After the date has expired I hide the date, means hide the line with the date. But at the website you will see an empty line then.
    If you have 3 date which are hide, you have three empty lines.

    That’s why it would be great if there would be an option to delete that line when hiding.
    Is this somehow possible, or could program this feature?

    best regards

    Andreas

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Arno Welzel

    (@awelzel)

    The plugin can only hide content which is inside the shortcode. Line breaks before or after the shortcode can’t be removed.

    So you should avoid line breaks outside the shortcodes.

    With line breaks outside the shortcodes:

    [timed-content...]Date 1[/timed-content...]
    [timed-content...]Date 2[/timed-content...]
    [timed-content...]Date 3[/timed-content...]
    [timed-content...]Date 4[/timed-content...]

    Without line breaks outside the shortcodes:

    [timed-content...]Date 1[/timed-content...][timed-content...]
    Date 2[/timed-content...][timed-content...]
    Date 3[/timed-content...][timed-content...]
    Date 4[/timed-content...]
    Thread Starter Andreas_HGW

    (@andreas_hgw)

    yes I know. What I mean is:

    At the website you can see the following:

    Our management meetings will be at the following dates:

    03.04.2020
    04.05.2020
    02.06.2020
    05.07.2020
    04.08.2020

    but if I time comes and some of the dates has expired it looks like this:

    Our management meetings will be at the following dates:

    empty line
    empty line
    empty line
    05.07.2020
    04.08.2020

    This looks not very professional. So I would like to delete the lines after hiding.
    This support forum automatically deletes empty lines. That’s why I had to write “empty line”

    Andreas

    • This reply was modified 4 years, 2 months ago by Andreas_HGW.
    • This reply was modified 4 years, 2 months ago by Andreas_HGW.
    Plugin Author Arno Welzel

    (@awelzel)

    Well – that’s the way how shortcodes work in WordPress and this is why I told you how you can create a workaround to deal with it. The plugin does not see any of the line breaks if they are OUTSIDE the shortcode. So the workaround is to put line breaks INSIDE the shortcodes, so they get removed as well if the content should not be visible.

    And an example here – some of the lines are hidden by Timed Content and as you can see there are no empty lines, lines 2 and 3 are just not there:

    https://wordpress-demo.arnowelzel.de/timed-content-multiline/

    And if you talk blank lines without BR in the HTML source – this is just whitespace left over by WordPress itself which also can’t removed by the plugin since this content is added AFTER the plugin has finished its work. But this is no problem since browsers just ignore line breaks.

    About how shortcodes work, also see here: https://codex.wordpress.org/Shortcode_API

    Timed Content is free to use. If you need a more “professional” solution without using many shortcodes but a backend to manage and display meeting events on a page/post you need to create your own plugin. Depending on your budget I can also develop a custom solution only for your specific use case. But this will be at least about 50 EUR per hour plus taxes. You will find my e-mail address on my website: https://arnowelzel.de/en/about-me

    • This reply was modified 4 years, 2 months ago by Arno Welzel.
    Plugin Author Arno Welzel

    (@awelzel)

    In addition – there are also many plugins available to handle events, maybe they fit your needs better:

    https://wordpress.org/plugins/search/event/

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘delete line when hiding’ is closed to new replies.