如何使用 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 (将#修改为@)