mardi 14 juin 2016

Removing default WP Widgets from my Custom Sidebar

I am registering a new Sidebar and by default WP adds default Widgets into it, how can I remove those widgets from my custom sidebar ?

unregister_widget('WP_Widget_Pages');

the above code completely deleted it from Admin Panel, I just want to remove from my custom side bar with id: my-custom-sidebar once registered it should remove default widgets (or any selected widgets that I want to remove)...

I have searched everywhere, found unset() as well, but didnt find the right answer to remove those Default widgets when I need to with a function. Basically, I am registering a new Sidebar and importing widgets into it, but all my custom widgets are imported including all default widgets by WP.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire