I read this article: http://www.makeuseof.com/tag/how-to-create-wordpress-widgets/ about how to create WordPress widgets. Everything went fine until this error page came out in my website:
Fatal error: Class 'RandomPostWidget' not found in C:\xampp\htdocs\sowhat\wp-includes\widgets.php on line 324
I sort of understand the problem, but I dont know how to fix it. In line 324, this is the code:
$this->widgets[$widget_class] = new $widget_class();
I think this happened because I changed the ‘Random Post Widget’ words to ‘News Widget’, including the class name. Maybe I did somthing wrong? Any help would be greatly appreciated!