Support » Requests and Feedback » Allow name in unregister_sidebar_widget()
7 years, 1 month ago
Would be nice if in the unregister_sidebar_widget() would accept either an ID OR a (class) name of a widget, as some of the other widget functions do.
This would be useful if in your templates you want to unregister all instances of a particular widget (rather than just a particular instance, for which you knew the ID).
For instance: you want to disable the Recent Post widget only in the homepage template (since it would be redundant).
See this solution.