No templates for condition page.php Elementor

I am building a WordPress theme and I want it to support the Elementor theme. But I get this error in Elementor Debugging mode.

No Template for condition theme name -page.php

What could be the cause?

This my page.php

?php
get_header();
?
    ?php 
if ( have_posts() ) {
    while ( have_posts() ) {
        the_post(); 
        the_title( );
        the_content();
    } // end while
} // end if
?
?php
get_footer();

Topic page-template theme-development Wordpress

Category Web


I finally figured out the problem and it was nothing related to the template files.

I had dequeue jquery and instead re-enqueued my custom jquery as Jquery instead of jquery which is used by Elementor and that was the cause of the issue.

This is how my code was.

wp_dequeue_script('jquery');
wp_deregister_script('jquery');
wp_register_script('Jquery', get_template_directory_uri().'/vendor/jquery/jquery.js', false, '3.4.1', false);
wp_enqueue_script('Jquery');

this I was my fix

wp_dequeue_script('jquery');
wp_deregister_script('jquery');
wp_register_script('jquery', get_template_directory_uri().'/vendor/jquery/jquery.js', false, '3.4.1', false);
wp_enqueue_script('jquery');

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.