You are currently viewing Fix missing the_content in Elementor template

Fix missing the_content in Elementor template

If you create a child theme for the parent Twenty Seventeen WordPress theme and also install a free edition of the Elementor plugin so that you can edit your Post using the plugin, you may get the error saying ‘You must call ‘the_content’ function in the current template, in order for Elementor to work on this page. There is an easy fix for this.

Here is what you need to do, assuming you develop your site on your localhost:

1. So, you get this error when you switch to edit your post with Elementor.

2. Go to your theme’s directory, it’s under wp-content >> themes >> somename-child directory.

3. Look for the file named ‘single.php’ and open it in your favorite text editor.

4. Add <?php the_content(); ?> inside the block of <main id=”main” class=”site-main” role=”main”></main>

php lines of code in a code editor

5. Save the file and refresh your admin Dashboard on local, edit your post.

6. Click on the ‘Edit with Elementor’ button again, you should be directed to the edit page inside Elementor.

Edit with Elementor blue button

This Post Has 2 Comments

  1. filmkovasi

    I think this is one of the such a lot important information for me. Joeann Ludvig Abell

  2. turkce

    I take pleasure in, result in I found exactly what I used to be taking a look for. You have ended my four day lengthy hunt! God Bless you man. Have a great day. Bye Lyda Filmer Farlay

Leave a Reply