You should not need to instantiate the widget class at the top of your code, because of the register_widget function hooked from your main class does that work for you.
EDIT: WordPress already instantiates your class.
Related Posts:
- WordPress error – PHP Fatal error: Uncaught Error: Call to undefined function register_block_type_from_metadata()
- Using the media uploader in a custom plugin
- register child class in another plugin
- How to prevent PHP fatal error if plugin hasn’t been enabled and a method is called in theme file?
- There has been a critical error on your website – won’t fix no matter what
- Plugin showing error
- Replace old theme that understand old css (vcex_icon_box css_animation)
- Woocommerce functions in custom class, avoid errors
- Between functions.php (theme), widgets, and plugins, which is loaded first?
- Should all plugins be encapsulated in a Class?
- Activate a plugin through PHPMyAdmin or FTP?
- How to catch/what to do with a WP Error Object
- Registering Class methods as hook callbacks
- An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration
- Get plugin_dir_url() from one level deep within plugin
- Conditionally enqueue a widget’s script/stylesheet in HEAD (only when present on page!)
- How to use classes declared in another plugin?
- What are the best practices for updating?
- Is there a plugin that will override the “Error establishing a database connection” message? [closed]
- Error: call_user_func_array() expects parameter 1 to be a valid callback
- Plugin upgrading: Widget settings
- How to eliminate weird 404 errors in wp-admin?
- Loading external page template and enqueue script from plugin causes 403 forbidden error
- Validation error: Extending Gutenberg gallery block
- Simple rich text editor in Text widget?
- How To Determine If A Filter Is Called In A Sidebar/Widget Context?
- Namespaces in WordPress – How do I initiate the main class?
- How to enable edit button in the theme’s customize UI?
- How do I fix the “sorry, you are not allowed to access this page” error I get on the “plugins > settings” links?
- How can I make my custom shortcode work in a Custom HTML Widget?
- Should messages in WP_Error already be html escaped?
- How do I extend one plugin I’m writing with another I’m writing using classes?
- Need to create a Theme demo site that features multiple themes
- Disable Specific Widgets on Selected Pages of a WordPress Website?
- How to get Login Error messages on a custom template
- Adding a widget programmatically
- PHP Deprecated: Non-static method should not be called statically
- Adding an admin page – OOP approach not working
- Delete Custom Dashboard Widgets
- scheduled event not getting executed
- Override dynamic_sidebar() in plugin?
- How to pass JavaScript variable to PHP in wordpress widget?
- Is dynamic forms/entries possible in Widget?
- Plugins error (Use roles and capabilities instead) on latest version, multisite
- How do I add a widget programmatically to a newly created site (WPMU) within a plugin?
- WordPress plugin installation error
- How To Add an Extra Field in All WordPress Available Widgets?
- How to place random widgets in the WordPress sidebar?
- Override Widget class in plugins with custom plugin
- Has anyone been able to get the aweber plugin to work
- How to create a widget or plugin to add custom content to my website?
- Pages with 2 Columns
- WordPress widget / plugin….fields not appearing in my widget
- Error: “Cannot modify header information”
- Custom Widget outputs the input but doesn’t save anything inside the textarea
- Can I ignore caching of a plugin in W3 Total Cache? [closed]
- Plugin.php: PHP Notice: Undefined offset: 0 in
- Why is the unrendered widget number `__i__` showing up in the JavaScript but not in the HTML?
- Why am I sometimes getting a 404 error when I try to update a page with Elementor?
- Custom Widget Creating PHP Exception When Placed In Its Own PHP File
- Remove Widgets in Dashboard
- Trying to get logged-in user data inside php class
- check for the current screen
- “Are you sure you want to do this?” when deactivating all plugins in WordPress 4.3.1 [closed]
- Themes VS Plugins [duplicate]
- Changing widget options via the functions.php when there are no hooks
- Conditional Display of Links in Widgets
- How can I retrieve data within my widget
- How to Get Admin Settings for a widget when using the_widget() with custom widget
- Check if a class exists within a method
- How should I handle errors within a plugin?
- How to unregister a widget from a child theme
- Force plugin to fail activation
- WordPress multiple widget in single plugin
- An Unexpected HTTP Error occurred during the API request
- Created Widget Not Showing up on Admin Panel
- How do I register a stylesheet inside a WordPress widget?
- Setting up widgets in wordpress with a unique ID for the after_title argument
- How to exclude a widget from page 1 of a paginated post
- Detect if a plugin was included in a certain page
- How to include and use custom class files in plugin?
- Can’t access my WP dashboard: fatal error? [closed]
- Dashboard Disappears after Upgrade
- How to get popular post from across a network?
- Are there plugins that interfere with the admin part of Rss widget?
- Flickr plugin that will display photos from multiple group pools? [closed]
- How do you install the automattic developer plugin under localhost for mamp when there is an error, deprecated?
- how can i limit the number of instances for my widget
- Creating a menu page in a Object Oriented developed plugin
- Dashboard Widget Form
- Why Better WP security plugin returns 418 I’m a Teapot “error”?
- I need some direction on how to have a sidebar based on meta rather than page
- echo do_shortcode is not working on theme’s template
- Seaweed Plugin not working
- All plugins deactivated due to error
- How can I reuse the WordPress search form for a custom plugin / widget?
- Admin Dashboard with Custom Tab for Client
- Multisite Widget/Content
- Passing $this->get_field_name() to javascript
- Using plugin functionality in external php script not working