如何解决如何使用 wp_insert_post 创建包含 Elementor 内容的页面?
我想使用 wp_insert_post 创建一个页面,但将该页面设置为包含 Elementor 内容。这是我的代码:
// Create post object
$my_post = array(
'post_title' => wp_strip_all_tags( 'Test Page' ),'post_content' => 'elementor json goes here','post_status' => 'publish','post_author' => 1,'post_type' => 'page'
);
// Insert the post into the database
wp_insert_post( $my_post );
但是当我这样做时,内容只会打印实际的 JSON。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。