Hello!
The short description (excerpt) is often used as a brief explainer for a product or post; it is why we chose to let it supersede the content when populated.
If you only want one or two products to use the long description instead of the short one, it’s easiest to write directly to the meta description field, which will always be used when populated.
Otherwise, you’ll have to fiddle with filter the_seo_framework_fetched_description_excerpt. To do that, you’d have to send it the post content (sanitized via tsf()->s_excerpt_raw( $excerpt )).
The SEO Bar can still state the description is fetched from the excerpt field (everything else is fine, though). In any case, let me know if you require assistance with that.
Hello,
Could you help me with the code for the filter?
I want all products to use the long description as the autogenerated meta-description.
Sure 🙂
Here it is https://gist.github.com/sybrew/ae58e7c1fdb1d3a7973e6599b47c16ba.
I made it extra comprehensive so that we can replicate it for other uses in the future; it’s bug-free as far as I can tell, albeit more challenging to understand.
It will fall back to the “long” description if no “short description” is found.
(Where to place filters?)
Thank you very much for your help.
He has been perfect.