I recently added a caption to my image in WordPress and now there is an empty <p></p>
tag after <img>
tag. It broke my style.
Can anyone tell how to remove it?
Thanks for the help.
4 Answers
It is not a good practice to override the WordPress native functionality. Instead you can hide the empty elements using CSS
p:empty {
display: none;
}
This will the empty elements.