Is there a way to “remove the widget from available widgets” after you’ve activated it once on some area?
The idea is to allow user to activate only one instance of it.
Leave a Reply
You must be logged in to post a comment.
Is there a way to “remove the widget from available widgets” after you’ve activated it once on some area?
The idea is to allow user to activate only one instance of it.
You must be logged in to post a comment.
You can create a one-time-use widget with the following example found here: wp_register_sidebar_widget
You can use JQuery to remove it from “avilable widgets” panel if it has been used once.
That is not an really good Idea. Because Themes wich I develope are more complex, so that you have different Sidebars through the different Views.
For Example:
Standard-Sidebar: Displays next to the Content
Shop-Sidebar: Displays next to the Shop-Overview
So and now I want to place your Widget into both Sidebars, because there is no view, where both sidebars are visible at the same time.
What you search for, is discard the Placement of your widget into an sidebar, where your Widget is still existing, right?