Hiya,
This is because you’ve got an empty paragraph of content in your content in this position. Empty paragraphs are likely not injected by WordPress, but paragraphs in general were changed slightly to look similar in the editor as they do in the public facing part of your site. It is possible you may have intentionally added them in the past to create space between the title and content?
How can I restore the rule that used to work?
- This reply was modified 1 day, 23 hours ago by
giusgenc.
I have the same problem, though it is only when I’m using shortcakes with the “Custom Content Shortcodes” plugin. Before 5.7 it worked fine, but now I have extra paragraphs everywhere I use the custom content shortcode.
As far as I can see the shortcode is only copying content (including format) from one place to another. It does not add extra paragraphs during that process. If I copy the very same text, there are no extra paragraphs.
Example here: https://mortenhede.dk/skuffende-foerste-premiereannoncering-fra-fredericia-musicalteater/
Does anyone know a quick fix?
Hello @clorith nope I don’t have any empty paragraph there.
I found the issue but not the solution yet.
Wherever I use <p>
tag is creating this whitespace.
In every place I used this to align <p style="text-align: center;">Hello</p>
the content center or justify put a 30px padding on both top and bottom of the paragraph.
What can be the solution here? The alignment is important, so removing them is not certainly the option for me.
@mortenhede the same for you. Yours article is justified and as you used the tags <p style="text-align: justify;">Hello</p>
to justify it put the space above and below of the paragraph.
@shadnanm Your explanation makes sense, but I do not use justify anywhere (as far as I know). But the signup form on my paywall is centered, as you see in the example post. I had the same problem there, but then I removed the style part from the p tag, and instead wrapped it with the <center> tag.
The rest of the content is aligned left. I don’t know if my shortcode plugin adds style in the p tags, but if so it will be “text-align: left;”
For the record I just tried a rollback to version 5.6.2 without changing anything else, and then the problem was gone. So it is definitely caused by the 5.7 update.
Hmm. I just found the extra paragraphs:
<p>
<!– /wp:heading –>
</p>
<p>
<!– wp:paragraph –>
</p>
Where the f*** do they come from?
- This reply was modified 1 day, 9 hours ago by
mortenhede.
@mortenhede not sure.
I am trying to do something on my staging site. I will let you know if I can do anything there.
Put this on your CSS editor And your problem will be solved 😉
body p:empty:before {
content: none;
}
Thanks.
You’re right. It’s solved! 😀
Thanks a lot!!