• Resolved salahsaqr

    (@salahsaqr)


    Hi,

    I need to add the_content function into the all pages template’s code.
    This is the line I need to add:

    <?php the_content(); ?>

    The reason is that when I try to open Elementor I get an error message says:

    “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.” >> Screenshot: https://imgur.com/rng7SKa

    And Elementor suggest this line I mentioned above as a solution for this issue.
    Here is their reference >> https://goo.gl/RoNNPN

    I’m using GeneratePress child theme by the way. Any thoughts on where & how to place this code to impacts ALL website pages at once?

    Thanks in advance!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Leo

    (@leohsiang)

    Hi there,

    That shouldn’t be needed.

    Sounds like you are trying to edit the blog page with Elementor? Unfortunately that’s not possible. See these couple replies here: https://generatepress.com/forums/topic/the-content-area-was-not-found-in-your-page/#post-282573

    Let me know.

    Thread Starter salahsaqr

    (@salahsaqr)

    Hi Leo,

    I’m not trying to edit blog page at all. I just cannot use Elementor anymore on all my website pages (homepage and others) that have been built with Elementor on my localhost environment. I always get that annoying error message. I tried to deactivate all plugins except Elementor but nothing happened.

    Any thoughts?

    • This reply was modified 8 years, 8 months ago by salahsaqr.
    • This reply was modified 8 years, 8 months ago by salahsaqr.
    Leo

    (@leohsiang)

    Have you tried contacting them?

    Theme Author Tom

    (@edge22)

    GP adds the_content() for you by default – no need to add it anywhere.

    Unfortunately this is just a poor error message that needs to be re-worded/improved. I’ve seen that sometimes people need to edit their .htaccess for it to work.

    Either way, it’s an Elementor issue which they should be able to fix for you.

    Let me know 🙂

    Thread Starter salahsaqr

    (@salahsaqr)

    Hi friends,

    I didn’t contact them as I realized that it’s not related issue. I see that all permalinks lead to 404 pages except the plain one (default). And Elementor is working only with the default permalink setting.

    Editing .htaccess file didn’t work for me.

    I would update when I find a solution. Thanks!

    • This reply was modified 8 years, 8 months ago by salahsaqr.
    Thread Starter salahsaqr

    (@salahsaqr)

    Hi there,

    I figured out that there were 2 things causing this issue at the same time (for this certain issue) since disabling all plugins didn’t solve the issue at the beginning.

    1. A server-side issue, where I was having to add this snippet inside the server block in nginx.conf file since pretty permalinks were leading to 404:

    if (!-e $request_filename) {
    rewrite ^.*$ /index.php last;
    }

    2. Really Simple SSL plugin.

    Only, when I added this code & disable this plugin, Elementor start working!

    Hope this helps someone 🙂

    • This reply was modified 8 years, 8 months ago by salahsaqr.
    Theme Author Tom

    (@edge22)

    Glad you got it working, and thanks for sharing the solution! 🙂

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Adding the_content’ function on website pages’ is closed to new replies.