Flash Sale for Premium Subscriptions

50% off annual premium licence subscription.

Get 50%off now

App Post Type Missing “the_content” Function

About Support Support App Post Type Missing “the_content” Function

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #3060
    Avatar for Nathan BoothNathan Booth
    Member

    “Sorry, the content area was not found in your page. You must call the_content function in the current template…”

    When attempting to create/edit the App post type, I receive the above message. Does anyone know where that post type/page template is defined, in order to insert the missing function?

    (this is in reference to the “app-content” post type as defined in the plug-in index.php file)
    Thanks

    #4663
    Avatar for Andy MoyleAndy Moyle
    Keymaster

    That sounds like your theme is a bit controlling!
    The app content post type is just where app content is stored for serving to the app. It’s not served to the website so doesn’t need a template file with the content function in it. If WordPress we’re trying to serve it publicly it would default back to theme index.php or single.php.
    Ask the theme developer why it’s doing that. You can create a post type specific file by copying index.php and single.php and renaming them. I’m a passenger in a car right now and can’t remember the naming convention! You can put it in the theme directory or create a child theme for it.

    But really your theme shouldn’t be throwing that error! Are you using classic editor? Or is it trying to do blocks? That may affect things

    #4664
    Avatar for Nathan BoothNathan Booth
    Member

    LOL Yes, I will try defining a post type specific file in my child theme, as you suggested. Once I have results, I’ll post here for anyone that may find it useful. I am using the Elementor editor with their default “hello-elementor” theme. Thanks for the hint!

    #4665
    Avatar for Andy MoyleAndy Moyle
    Keymaster
    #4666
    Avatar for Nathan BoothNathan Booth
    Member

    It’s actually really odd. The post type shows up in the selection screen (together with prayer requests, Bible reading, etc.) and I had already selected them all, and Elementor successfully allows editing of each one – EXCEPT the “App Content” (even though it is selected). This also goes for the Template section of Elementor. It recognizes and allows you to create a template for Single > Post > prayer/Bible – but App Content is not even in the drop-down. There is something fundamentally different about the way the custom post type app-content is implemented, which is not working with Elementor.

    #4667
    Avatar for Nathan BoothNathan Booth
    Member

    @andymoyle:
    Here is the root issue…
    In the Church Admin Plugin file “Index.php”, where you register the post type “app-content”, the following parameter exists – ‘publicly_queryable’=>false,

    This is preventing Elementor from fully detecting this post type. If I change it to “true”, then I have no issues.

    Can you please comment on:
    – what issues might arise if this parameter is changed
    – whether this change would be considered in the next update, and if not, what work-around would you recommend?

    Thanks for your help!

    #4668
    Avatar for Andy MoyleAndy Moyle
    Keymaster

    Won’t be a problem – was worried that it would then show up in front end site searches, but that can and was already stopped with another option.
    It’s in the next update v2.6890 ;-)

    #4675
    Avatar for Nathan BoothNathan Booth
    Member

    FYI… In case anyone else runs into this, the other KEY component to making the post type work with Elementor is to go into your settings > permalinks… and just click SAVE. You do not need to make any changes. Until you do this, WP will regenerate the valid list and Elementor will not work.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.