I'm working on a plugin that allows the user to create "page/post types", customize the type style, then tag a page/post with that type. All of this works. My problem is this plugin also needs to allow them to attach widgets to said type.
I have no way of knowing how many "types" there are at any time.
The plugin works like this:
- User creates types (cat, dog, mouse)
- User specifies things like background colors, link colors, etc. for a type
- User specifies widgets for that type
When the page/post is viewed the page detects if it has a type. If it does it pulls in all the relavent data to that type.
Everything works PERFECT.
I know I have to register a sidebar but I can't registe for each type since I have no idea how many there are and the user can create and delete at their whim.
- Register a sidebar called "custom sidebar"
- Create a page that mimics the "Widgets" page
- Allow the user to add widgets there on the "custom sidebar"
- The plugin stores data for the sidebar based on the "type"'s id
I can't really use another plugin since the sidebar function has to meld right into my plugin. I'm not even sure this will work or even where to start. Any push in the right direction would be great!