Clear the options when a Widget is removed from the sidebar
-
I am developing a widget that displays Featured Posts in the sidebar. You can select the number of posts and the category. Whatever category is selected ends up being removed from the main section of the index page so as not to have two of the same posts displayed.
You can see an example at https://wordpressthemes.tinkerpriestmedia.com/?wptheme=Magazine%20Basic
The problem I have is that when the Widget is removed from the sidebar, the options still exist and the way it is coded, it checks for those options to arrange everything properly on the main page. Is there a way to clear the options when a Widget is removed or is there a function to check if a Widget has been activated or deactivated?
Thanks.
- The topic ‘Clear the options when a Widget is removed from the sidebar’ is closed to new replies.