Why does a published post only displays the title and not the content in the site? [closed]
-
18-04-2021 - |
Frage
I published a post last January 3 and it went out fine. Now, I published a post again but the site only displays the title and not the content. This is the first time that this happened to me. Do you have any idea why this happened?
I don’t use any plugins and I use a free theme.
Lösung
Your content is there BUT hidden from view via CSS styles.
Normally wouldn't provide an answer for this, but it may be helpful to others as it is not uncommong.
This is usually due to CSS styles in external stylesheets, inlined in your <head>
in of the html document (template header) OR more commonly as inline styles on your content which contain elements such as <div>
, <span>
and <p>
(among) others wrapped around various pieces of your content.
In your case it is <span>
tags
See below:
Solutions
If you are using the default WordPress content editor:
- switch to the Text tab instead of the Visual tab and remove the span tags OR at least the
display:none
property.
If you are using something else like a page builder:
- the process should be similar but you may need to consult their documentation
By the look if it, you are not though.