Arti Rana
Arti Rana

Reputation: 39

Elementor says - "Sorry, the content area was not found in your page. " while using custom shortcode

I am using default theme of Elementor Plugin. Plugin is very nice but I am facing issue while using my custom shortcode in page. It shows “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.” [1]: https://i.sstatic.net/7xBHV.png

To solve this error, I have added <?php the_content(); ?> in my custom shortcode but it shows the same error. I have also tried by creating a custom template, but the result is same.

So please help me to solve this error. Any suggestions are acceptable.

Thanks in Advance

Upvotes: 3

Views: 2884

Answers (3)

Umair Javed
Umair Javed

Reputation: 11

This happens when your page is being used by a theme or plugin by default. For example if you are using a theme for e-commerce, cart page created by woocommerce will be edited by elementor.

In the same way, if you are using Tutor LMS plugin, courses page will not be editable by elementor.

For editing and designing a page using elementor, you have to look for something like a shortcode to place in a section and design the rest using elementor.

Upvotes: 0

Felix H.
Felix H.

Reputation: 1112

I also used to face this problem. My scenario was creating the custom post type, and I'd already added <?php the content(); ?> in the file single-custom-post-type.php to get Elementor. But, it kept showing the message: "the content area not found" by Elementor.

Finally, I found the problem was that I needed to refresh the permalink by going to Settings > Permalinks, and click the 'Save' button anyway.

P.S.: This might be a careless and dumb mistake, but just sharing so that someone might get helped and reminded to do this.

Upvotes: 0

Junior Oliveira
Junior Oliveira

Reputation: 56

Probably your shortcode function changes the post query. try adding wp_reset_query(); before the function closes.

Upvotes: 4

Related Questions