Multiple instances of a single widget
-
Hello guys!
I searched the forums, the developer stuff (codex etc), and even tried to find a plugin doing the following (to copy some code >_>), too:
How do I have multiple instances of a single widget?
I need this for my plugin pb-embedFlash to display multiple widgets with different flash content. At the moment, I’m using a workaround by putting the wp_register_… stuff into a for-loop.
(Yes, I should use the register_… without wp_, but I don’t find a documentation…) But it only works on Firefox, not on Internet Explorer… (don’t ask me why…)Defining/forcing the number of widgets by copying the register_-functions x times is no solution for me.
From Plugins/WordPress_Widgets_Api:
Widgets – One or many
Widgets can be coded so that they can exist one time or they can exist multiple times. WordPress is doing the work for you to instantiate your Widget multiple times if you follow some rules.
But there is neither no link, nor an example…
Overall, there are only little information on writing widgets…
Maybe you can help me.
– Pascal
- The topic ‘Multiple instances of a single widget’ is closed to new replies.