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?
6
Answers
Probably you’ve edited the page template from
Templates -> Theme Builder -> Single
. Anyway, even if you don’t, you can fix it that way: Go toTemplates -> Theme Builder -> Single -> Add New
, then selectpage
and create a template for all single pages (make sure that you drag the page content widget in the template). This should overwrite your theme single page template (which misses the content function).Just make sure your ‘Home Page’ and ‘Posts Page’ are different, otherwise you get your page mixed up and this error occurs.. Worked for me!
You can verify this setting in Appearance>Customize>Homepage Settings ๐
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:
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.
I found myself in the same place yesterday and freaked for a moment and did some research to find out why I was receiving the error and came across this page. Believe for me it occurred due to the situation Ed Jones posted about above, I had inadvertently edited the post template. But a fast and easy fix was to go back to an earlier revision of the page in my history. That solved my problem quickly.
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.
Add
the_content()
at the end of your templates