Title: unregister_widget throws error
Last modified: August 20, 2016

---

# unregister_widget throws error

 *  [pan69](https://wordpress.org/support/users/pan69/)
 * (@pan69)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/unregister_widget-throws-error/)
 * I want to remove some of the default widgets since I don’t need them and I don’t
   want to confuse people using the Administration section that these widgets have
   an implementation.
 * I’m using the “unregister_widget” function defined here: [http://codex.wordpress.org/Function_Reference/unregister_widget](http://codex.wordpress.org/Function_Reference/unregister_widget)
 * But when I call it, e.g., to remove the Categories widget (or any other for that
   matter), it throws and error:
 * unregister_widget(‘WP_Widget_Categories’);
 * Results in:
 * Call to a member function unregister() on a non-object in wp-includes/widgets.
   php on line 451
 * Any help, or other approaches to remove default widgets, would be much appreciated.

The topic ‘unregister_widget throws error’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [pan69](https://wordpress.org/support/users/pan69/)
 * Last activity: [14 years, 2 months ago](https://wordpress.org/support/topic/unregister_widget-throws-error/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
