[Resolved] Need help adding the_content function into the page template's code

Home Forums Support Need help adding the_content function into the page template's code

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #1184557
    Joe

    I’m using the Generatepress child theme with the Elementor Pro page builder.

    The problem I’m having, is when I try to create a popup template opt in form in Elementor, it shows this:

    “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.”

    It says to add this:

    <?php the_content(); ?>

    Can you help me with where to add this?

    Thank you,
    Joe

    #1184624
    David
    Staff
    Customer Support

    Hi there,

    can you run us through the steps you’re taking to create the Pop up ?
    e.g is it from the Dashboard > Elementor or within a published Page.

    #1185125
    Joe

    Hi David,

    Sure, in my WordPress dashboard using the Elementor Pro plugin, I go to templates. Then I can create and save templates. I have some currently that I can use and edit no problem.

    It’ll let you create and save them in different ways. One of the ways to save as a template is as a popup, which is what I’m trying to do for an opt in form.

    But when I try to create it, it just 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.”

    Then it offers this as a solution:

    https://docs.elementor.com/article/56-content-area-not-found

    <?php the_content(); ?>

    I’m just not sure where to put it.

    Thank you for any help,
    Joe

    #1185149
    David
    Staff
    Customer Support

    GP automatically adds the_content() function to the theme templates.
    And i just tried the method you prescribe on a test site and it worked.

    Just to be clear:

    1. Elementor > Templates > Add New
    2. Select Pop Up from Drop Down
    3. Gave Template a name
    4. Clicked Create Template
    5. Editor opened ok – added some stuff and saved etc.

    So in the Elementor troubleshooting doc:
    https://docs.elementor.com/article/56-content-area-not-found

    Can you try some of the steps under:

    Does this happen on all pages, using any theme? If so, here are some reasons this might be occurring:

    #1185227
    Joe

    The odd thing is, is I contacted my hosting provider about this problem, and after they looked at it, it worked. So I thanked them for their help.

    But the next day it seemed to go back to the same problem:

    “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.”

    Then after hearing back from you, it’s working again.

    I’m not sure why sometimes it works, and sometimes it doesn’t?

    I guess I’ll see what happens.

    Thank you for your help,
    Joe

    #1185309
    David
    Staff
    Customer Support

    Two main things i have come across in the past:

    1. Caches
    Whether they be Plugin or Server side. If you can keep them disabled when building all the better.

    2. PHP Memory – the more the merrier – i generally set mine to a minimum of 256meg.

    #1185692
    Joe

    It’s not working again.

    I checked my PHP Memory and it’s over 700.

    I disable the cache.

    I even tried to create another popup opt in, and it still says content not found.

    It’s probably something simple, I just wish I could figure out what it is.

    Thank you again for trying to help.

    #1185739
    David
    Staff
    Customer Support

    All i can suggest is running through that list of possible issues in the Elementor docs.

    Also try using a Private/Incognito browser to eliminate browser caching causing a problem.

    #1191262
    Joe

    Hi David,

    Thank you again for trying to help.

    The problem seems to be device related.

    For some reason, my laptop at home always gives the content not found message, but my desktop at work always seems to work.

    I’m not sure why that is?

    I know it’s nothing related to Generatepress.

    Thanks again for your help.

    Joe

    #1191639
    David
    Staff
    Customer Support

    Disable any browser extensions you have to see if they are conflicting.
    And then try in an incognito/private browser as the cache can cause issues.

    #1193195
    Joe

    Hi David,

    I appreciate the reply’s.

    I’ve tried the incognito, and it still doesn’t work.

    I haven’t tried disabling any browser extensions, I’ll try that.

    I have tried other browsers though that didn’t have any browser extensions, and it still doesn’t work.

    I’ll try disabling my Chrome browser extensions.

    Thanks again,

    Joe

    #1193322
    David
    Staff
    Customer Support

    May be worth trying another network – routers and ISP’s also cache pages, which may be throwing an error.

    #1263111
    Joe

    Hi David,

    With all the latest updates, it’s now working properly.

    Thank you for your help,

    Joe

    #1263438
    David
    Staff
    Customer Support
Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.