admin管理员组文章数量:1435776
When adding content into the description and short description fields for a product, line-breaks and
tags are completely removed from the markup. Other than installing Advanced TinyMCE, is there any setting, filter, or hook I need to check to make these fields include
elements.
In review of the Product object array in WooCommerce, it looks like the value for description is wrapped in the wpautop() function, but it doesn't appear to be working (it's possibly I'm just not understanding this part of the code correctly within the plugin).
Any ideas on how to force paragraphs into short/description content in WooCommerce?
Note: I only have ACF and WooCommerce installed as plugins. I'm using Underscores as a parent theme to build my own custom theme and product templates.
When adding content into the description and short description fields for a product, line-breaks and
tags are completely removed from the markup. Other than installing Advanced TinyMCE, is there any setting, filter, or hook I need to check to make these fields include
elements.
In review of the Product object array in WooCommerce, it looks like the value for description is wrapped in the wpautop() function, but it doesn't appear to be working (it's possibly I'm just not understanding this part of the code correctly within the plugin).
Any ideas on how to force paragraphs into short/description content in WooCommerce?
Note: I only have ACF and WooCommerce installed as plugins. I'm using Underscores as a parent theme to build my own custom theme and product templates.
Share Improve this question asked Mar 30, 2019 at 17:48 macondo_buendiamacondo_buendia 1051 silver badge8 bronze badges1 Answer
Reset to default 6So, I realized I was using the actual object in the template to call the description $product-get_description()
. If you're experiencing this issue, then you can wrap this in a wpautop()
, or you can do what WC actually does (not sure how I didn't remember) and use the simple the_content()
function to get the description. That will wrap any line breaks in your the editor with <p>
tags if you want them.
本文标签: wp autopWooCommerce Description and Short Description ltpgt tags removal
版权声明:本文标题:wp autop - WooCommerce Description and Short Description <p> tags removal 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745642707a2667954.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论