在我的带有 elementor 的页面中找不到内容区域

Fro*_*cal 2 wordpress elementor

我刚开始使用 Wordpress,几周前我发布了一个网站。今天我想编辑主页,但我收到以下错误:

Sorry, the content area was not found in your page. You must call the_content function in the current template, in order for Elementor to work on this page.

我还没有编辑过我的主页,几周前它运行良好。有没有人可以帮我解决这个问题?

PHP*_*... 6

如果您在页面上使用任何短代码,并且您正在该页面上获取帖子并在 while 循环中循环浏览帖子。请在循环结束后添加此内容。

wp_reset_postdata();

代码将如下所示:

$posts= new WP_Query($args);
while ($posts->have_posts() ) : $posts->the_post();
  .....
  .....
  .....
endwhile;
wp_reset_postdata();
Run Code Online (Sandbox Code Playgroud)

不管它是一个短代码,或者如果我们正在做类似上面的事情,请确保添加 wp_reset_postdata();

这是我通常面临的问题之一。也可能有其他原因。