Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

content area not found in my page with elementor

I just started with Wordpress and I published a website a few weeks ago. Today I wanted to edit the homepage, but I get the following error:

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.

I haven't edited my homepage and it worked perfectly a couple of weeks ago. Is there someone that can help me fix this issue?

like image 934
Frogical Avatar asked Oct 26 '25 03:10

Frogical


2 Answers

If you are using any shortcode on your page and you are fetching post on that page and looping through the post in a while loop. Please add this after the loop ends. No sure why but this always cause issue for me.

wp_reset_postdata();

Code will look like this:

$posts= new WP_Query($args);
while ($posts->have_posts() ) : $posts->the_post();
  .....
  .....
  .....
endwhile;
wp_reset_postdata();

It doesn't matter it's a shortcode or what if we are doing something like above make sure to add wp_reset_postdata();

This is one of the issues that I usually face. There can be other reasons too.

like image 89
PHP Worm... Avatar answered Oct 29 '25 08:10

PHP Worm...


The Answer to this error is to check the structure of your permalinks. Try to save your permalinks one more time. Also, try to change the permalink structure to “Plain”. Some servers do not allow to write to the .htaccess file and as a matter of fact, you cannot always modify your permalink structure and edit with Elementor.

like image 34
Peterumimo Avatar answered Oct 29 '25 08:10

Peterumimo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!