首页 > 解决方案 > 是否可以以编程方式更新 ACF Wysiwyg 字段?

问题描述

我必须从 php 更新 ACF Wysiwyg 字段。我想将渲染(从另一个所见即所得字段渲染)内容插入到该字段中。

update_field()不适用于所见即所得的领域。有没有其他解决方案?

我无法更改字段类型。

标签: wordpressadvanced-custom-fieldswysiwyg

解决方案


您需要使用html_entity_decode. 就是这样;

update_post_meta($postid, 'key', html_entity_decode('HTML HERE'));


推荐阅读