Grid of Posts Text Format
-
In a Gutenberg grid the text excerpt is just text run together, line feeds ignored and not even replaced by a space.
Is there any way to fix this?
The page I need help with: [log in to see the link]
-
Hi @bobjgarrett,
I hope you are using the latest version of WordPress (7.1.2). Which theme are you using? Is this Gutenberg grid part of a theme block?
How are you managing the text excerpt? Is it added manually or generated automatically?
If possible, share the URL of the post having the issue with a screenshot.
Yes, latest version of WP and Adventurous theme (might that be the problem?). The posts have already been created and usually we just list them but want to look at showing them as summary page with a picture to be added before people click on them.
This is the page – link moved to link field
Hi @bobjgarrett,
The summary page shows the text excerpt as expected, like the following. Can you check it again after clearing the cache?
Length: 33 feetBeam 11.42 feetLocated Lake Champlain, USAPrice: €60000 The GibSea 33 has two…
Dufour 34 Performance 2007 Location: Beaulieu River, Hampshire, UK Length: 10.06mDraft: 1.9m In…
If you are still experiencing these issues, please contact Adventurous theme support.
but the text is run together with line feeds ignored, not even changed to a space.
By default, WordPress strips out HTML tags from automagically generated post excerpts. So things like new paragraph line breaks (
<p>tags) will be stripped out. This is the default WordPress behaviour, and not a theme issue.But you’re using the The Post Grid plugin for the grid posts on your “Books for Sale” page. I’ll recommend asking the plugin’s dedicated support form to see if there’s a solution:
-> https://wordpress.org/support/plugin/the-post-grid/
If the plugin has no solution, your options are:
1) Use a plugin like Advanced Excerpts to retain HTML tags in the automagically generated excerpts
2) Add a snippet of PHP code to do the same thing as #2
Good luck!
-
This reply was modified 3 days, 8 hours ago by
George Appiah.
This looks like the plugin is generating an automatic excerpt and stripping the paragraph/line break formatting.
The cleanest fix is to add a manual excerpt to the post and let The Post Grid use that instead of auto-generating the excerpt.
Example:
Length: 33 feet<br>Beam: 11.42 feet<br>Location: Lake Champlain, USA<br>Price: 660000Then check The Post Grid settings and make sure it is using the custom/manual excerpt.
If
<br>is still stripped there, then it is likely a plugin limitation and may need a small custom filter or support from The Post Grid team.Apologies to all. I was not using the standard grid but a grid from a plugin. I will ask the author for advice.
Hi @bobjgarrett,
No problems. It looks like the excerpt was generated automatically, and the Grid stripped the HTML and whitespace from it. So a CSS fix will not work here; it is better to consult the plugin author. Please share the results once the issue is resolved.
This looks like the plugin is generating an automatic excerpt and stripping the paragraph/line break formatting.
Again, this is not the plugin stripping anything. The plugin is not even generating the excerpts: it’s merely using the built-in WordPress excerpts feature.
And WordPress stripping HTML tags out of its built-in excerpts (
the_excerpt()template tag) is a documented feature that has been around for as long as WordPress has had excerpts. Read it here for yourself: https://developer.wordpress.org/reference/functions/the_excerpt/Thank you for that pointer. I failed to find this myself.
-
This reply was modified 3 days, 8 hours ago by
You must be logged in to reply to this topic.