I am attempting to use a slightly modified form of a widget in the Hueman theme alongside its original version. The header is as follows

class AlxPostsFork extends WP_Widget {

/*  Constructor
/* ------------------------------------ */
function __construct() {
    parent::__construct(
  'alxpostsfork',
  __('Hueman Posts Fork', 'hueman'),
  array(
    'description' => __('Display posts from a category', 'huemanFork'),
    'classname' => 'widget_hu_posts_fork'
  )
);
}

In Widgets.php (/wordpress/wp-includes/widgets.php) I have inserted the following line

register_widget('AlxPostsFork');

And I am getting the following error:

Fatal error: Class ‘widget_hu_posts_fork’ not found in
C:wamp64wwwwordpresswp-includesclass-wp-widget-factory.php on
line 106

What am I doing wrong?

Read more here: Using slightly modified widget


Solution:

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


Wordpress related questions and answers: