Archived topic
GenerateBlocks Excerpt for Products not Working
5 replies · Started by Magnus on June 1, 2022
Hello,
I'm using GenerateBlocks Version 1.5.0-beta.2 completely on my homepage: https://ride-with-love.bike/
GenerateBlocks works perfect. But in the first chapter on the homepage "MTB ENDURO ALPENCROSS & MEHRTAGESTOUREN", which is the teaser section for my WooCommerce Shop Products, the GenerateBlocks QueryLoop doesn't reduce the excerpt length to the setting e.g. '100' for products. For posts excerpt length works.
Any idea what the cause of the problem is?
Thanks, Magnus
Hi Magnus,
Tried testing the excerpt functionality of the Headline Block in a Query Loop Block for Products and it seems to work as expected from my end: https://share.getcloudapp.com/6quzkjK7
Can you try clearing all caching mechanisms set in you website?
Moreover, does changing it to any value(not just 100) take effect?
Kindly let us know.
Hi Fernando,
thank you for your reply. This is really strange. Because in editing mode the excerpt shows the desired setting (https://www.screencast.com/t/nCk8PEAT), but not when published.
I've cleared all cache but without any change. With the post excerpts works directly, without clearing cache.
Any idea?
Best, Mags
I see. Are you using a product short description?
If you remove that, the excerpt length should work if you place the description in the text area under the Product title.
Kindly let us know how it goes.
Hi Fernando,
checked and that's the source of the problem: product short description. If product short description has content, GenerateBlocks QueryLoop isn't able to size the excerpt length.
What do you think, will there be an Update or should I change my product content structure without product short description?
Best, Mags
Yes, by WooCommerce and WordPress default, the product short description works like a Custom Excerpt for product archive pages. In comparison, when there’s a custom excerpt set on a post, it overrides the excerpt and the excerpt count set.
Yes, one way to approach this is you could only set the full description and leave the short description empty.
As for the product short description, if you plan to use one, an alternative would be to create a custom field for you products then, hook that post meta to the product single page for instance.
Hope this clarifies!