Disable frontend HTML output when fields are left empty
-
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)
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.