If I have a class xxxx_widget extends WP_Widget inside a php file, how can I include that file from the main file inside my plugin. I have a main file with plugin name etc, then I have another file with class xxxx_widget extends WP_Widget and I want to include the file with class xxxx_widget extends WP_Widget in the Main file.

Main file:
include 'wp_widget_file.php';
WP_Widget file(wp_widget_file.php):
class xxxx_widget extends WP_Widget {
    public function __construct() {
    }
}

Should I use include in the main file?
Can somebody give me a hint on how to solve the problem?

Read more here: How to Include WP_Widget class in main plugin file


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , , , ,

Wordpress related questions and answers: