• Resolved evanltd

    (@evanltd)


    If I don’t fill in any of the Credit fields, the plugin still outputs an empty tag on the front end: <span class=”media-credit></span>

    This has a ripple effect. WordPress in turn sees that code as part of the caption, therefore it always outputs a <figcaption> wrapper, even if the image has no caption.

    These empty tags create undesired whitespace/styling issues when <figcaption> has padding/bkg color for example.

    Is there a way to make the plugin only output HTML when there is actual credit info to display? To avoid empty tags? Thanks.

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

    (@pputzer)

    Hi @evanltd, that should not happen. Can you give me a bit more information on your Media Credit settings and workflow (i.e. are you using the Block Editor or Classic Editor with shortcodes)?

    Plugin Author pepe

    (@pputzer)

    Hi @evanltd, I’ve experimented a bit and was able to reproduce the issue when default credits are disabled (with the block editor). It will be fixed in the next release.

    Thread Starter evanltd

    (@evanltd)

    Awesome, thanks so much! And yes, I did have default credits disabled, using the block editor.

    Plugin Author pepe

    (@pputzer)

    Will be fixed in 4.1.0.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Disable frontend HTML output when fields are left empty’ is closed to new replies.