King Widget Framework

Worpdrpess Widgets king frameworkThe King Widget Framework contains a bunch of files and libraries on which all of the King Widgets depend.  Without those files none of the King Widgets will work! The Framework resides in the /plugins/king-includes/ – Folder.
I decided to  put often used functionality into those files, to make developing and maintaining widgets smoother.

Those of you that are already using my King widgets might askes themselves why to upgrade .. well i implemented a better AJAX foldable Admin Menu, made some css improvements and cleaned up the folder structure.

Check out this little screencast (sorry for the format was just a fast shot):

 new_ajax_menu_1.wmv (283.75 KB )

The Framework includes:

  • one Language file for all King Widgets (currently only german)
  • CSS Styles for widgets
  • JS used in Widgets
  • Images for Adminarea
  • php libraries for Forms and Admin Head includes

Since those are a a couple of files, it is kinda hard to give the framework an overall numbering scheme. Therefore I´ll keep track of the changes in a changelog.txt file and go by date. The php and css files aditionally have an internal version numbering.

For future changes I´ll always put up the whole framework (Folder king-includes) so you can simply replace your existing files with that. 
Yes i know i need a public SVN .. we are working on that and some more changes to make our wordpress plugins, themes and widgets easier available.


Version 0.70 – 03.09.06

– new function to have a comma separated list in the "where ot show on sitearea "

– updated language file 


– Framework now has version numbering + remote version check with a  Plugininterface to accomplish that
– added a switch in the framework plugin options to enable javascript includes for the new sliding widgets feature
– minor bugfixes + language strings

added functions to have a widgets options dump for easy transfer of set options. The King Login Wdget is right now the first to test this functionality. Other widget will follow when it proves itself stable

Inside the folder there is also a changelog file


Place the folder in the zip -> "king-includes" into WordPress Plugins folder -> wp-content/plugins/

Activate the Framework in Adminarea. The Activation is mainly to have a remote version check. With the time there will  more options added to it.

Known issues 

CSS Background Images in Widgets Admin are not shown.

If you have your WordPress installation inside a subfolder on your webspace e.g. ww.mySuperSite/wordpress/ you need to adopt the background image pathes in the CSS-Style Sheet. Those background images give your widget headers and the king widget menus a nicer look.

Look for those lines in king-includes/css/king_widget.css  


append your install sub directory in front of the line:



Internet Explorer shows all Menu´s open

I tried 4 hours to get by a ie bug and have not found a decent solution yet. If you are still using IE,  well … that´s your problem, you will not be able to see those nice sliding menu´s. The bug shut the widgets admin menu´s  directly after you opened them.

Please get yourself a descent browser:


The good News … I implemented a css style hack so that you can still set all King Widget Options and therefore use all King Widgets. All Menu Options of the widget are initally expanded.
Hopefully one of our CSS Freakz can give me a hand with this, or maybe you find a solution!

You are already using some King Widgets

Replace the king-includes folder with the new one. Grab yourself the new Version of the King widget you are using.



Version  0.70 (03.09.2006 14:49)


Version 0.68  from 03.07. July 2006 (03.07.2006 00:42)

PreviousVersion  from 22. June 2006 (22.06.2006 08:45)

Have Fun.. 

82 Comments to King Widget Framework

  1. 16.04.2007 at 13:29

    Thank you for this work around it had stumped me for some time. To the person who left comment 59, please see comment 56 for the simple answer. Note that there are two occurrences of “prototype.lite.js” in the file: I just changed both and it worked. Yay.

  2. hans's Gravatar hans
    30.03.2007 at 19:57

    same problem with widgets which are not dragable please help

  3. 09.03.2007 at 13:14

    This looks very interesting,

    I must ask, did you try to see how does this implements with the k2 theme from Michael Heillman, and if you did, are there any steps to be taken as this theme integrates widgets as a default, without a need for a widgets plugin.


  4. Don's Gravatar Don
    27.02.2007 at 20:46

    Thanks Jason,
    dots…dashes…jeeeez this stuff will drive ya nuts!

    I edited it to „prototype-lite.js“ and it works.

    So, for others reading this, don’t bother copying prototype.js into the king_includes/js folder as described in comment 51. There is no need for that.

    Simply search for „prototype.lite.js“ in the king_widgets_functions.php file and edit it to be „prototype-lite.js“. That should fix it.

    Still, the author needs to update this…

  5. ade's Gravatar ade
    23.02.2007 at 13:11

    im having the same problem with non draggable widgets

    i copied wordpress‘ protoype into king includes and renamed it to prototype.lite.js – that got rid of a javascript error i was getting in options, but i still cant drag

  6. Jason's Gravatar Jason
    23.02.2007 at 6:57

    Actually, the problem isn’t the prototype-lite.js, it was that in the king_widget_functions.php it was written as „prototype.lite.js“ instead of „prototype-lite.js“. I discovered this when I tried to do a find and replace as suggested in comment (kommentar) 51.

  7. Don's Gravatar Don
    23.02.2007 at 4:03

    Keep an eye here. I’m sure the fix will be updated in the plugin before too long. Better to have things buttoned up correctly :-) Upgrades work then.

  8. Tomas's Gravatar Tomas
    23.02.2007 at 1:37

    Thank you Don!

    I did this hack, and now have working widgets.

  9. Don's Gravatar Don
    22.02.2007 at 12:51

    King Framework prototype-lite.js is the problem with the widget plugin breaking. I edited the king_widget_functions.php to use the default prototype.js included with wordpress 2.1 and all is well.

    I copied the WordPress 2.1 prototype.js file into the king_includes/js folder first.
    Then did a search and replace inside the king_widget_functions.php file. I replaced „prototype-lite.js“ with „prototype.js“.

    This is a HACK fix! So the plugin author needs to update the plugin the „right“ way and re-release :-)

    I assume other King plugins are probably negatively affected by this hack since there must be a reason for the existence of prototype-lite.js…but I don’t know which ones use it or why there is a lite version. Something in the „lite“ prototype file stomps on the default prototype file.

  10. Don's Gravatar Don
    22.02.2007 at 11:09

    The current king-framework (0.70) breaks the current widget plugin ( such that the widgets can not be dragged.
    Please advise.

    Thanks for your excellent work!

  11. Marcio Tavares's Gravatar Marcio Tavares
    21.02.2007 at 12:55

    Bernhard Fischer,

    For the moment King Framework is not compatible with WordPress 2.1, you’ll have to revert back to WordPress 2.0.x in order to make it work.

  12. 19.02.2007 at 22:07

    the same problem here as described in post no. 47 – Ich habe das gleiche Problem wie im Posting Nr. 47 beschrieben.

  13. Marcio Tavares's Gravatar Marcio Tavares
    17.02.2007 at 13:27

    Hi Georg,

    First of all I would like say that your work „King Framework“ and all it’s applications are amazing.


    I have installed the widgets according to the instructions (in wp-content/plugins/widgets/) and also your framework (in wp-content/plugins/) with the King Text. What happens is that when I activate your framework and widget, I’m unable to move my widgets around on the sidebar, they get stuck. I have wordpress 2.1 and widgets for wordpress 2.1, but amazingly the wordpress widgets didn’t come with the folder „scriptaculous“ so what should I do to solve this problem?

  14. 03.01.2007 at 22:04

    Ich hab das gleiche Problem wie in Kommentar # 21 beschrieben. Schalte ich nun (wie in #22 erklärt) aufklapp js aus, bekomme ich kingLoadEvent is not defined
    als Fehlermeldung. Kannst du mir da helfen? Wäre super!

  15. 02.01.2007 at 1:10

    Hello we like your widgets. How can we have the same backgrounds that you see in the Calendar and the Monthly Archives.

    Here is a comment someone who looked at the above link sent me. Can you help me figure out what to do. It’s apparently a style issue, but I am not sure the best way to do it. I’ve tried a couple approaches, but none work. And I don’t want to make changes to your php code, in widgets.php.

    By doing a search for sidenav_bottom.jpg in your css file I found all the styles that use it, and from there i was able to deduce that this one was applying it to the ‚Monthly Archives‘, and its being applied because ‚Monthly Archives‘ is the only section that has a ul inside a ul.

    #sidebar ul ul {
    background: #F3F6ED url(img/sidenav_bottom.jpg) no-repeat bottom; /*this style applied the background to a ul inside a ul inside #sidebar*/
    border: #E1D6C6 1px solid;
    font-size: 0.9em;
    list-style-type: none;
    margin: 0;
    padding: 5px;
    padding-bottom: 3em;

    this is how your ‚Monthly Archives‘ section has a ul below the h2 heading.

    Monthly Archives

    December 2006

    Now looking at your HTML i can see that all other sections that don’t have the background do not have the items inside a ul, put the items below the heading inside a ul and it will work.

    for example, take ‚Contributors‘.. write out the html for this section as follows (similar to the ‚Monthly Archives‘ above)


    Bogdan Dzakovic

    Debra Burlingame

    also note;
    background: url(img/sidenav_bottom.jpg) #F3F6ED no-repeat bottom;

    should be in this order:
    background: #F3F6ED url(img/sidenav_bottom.jpg) no-repeat bottom;

    Here is the Style Sheet

  16. 28.12.2006 at 6:15

    I’ve installed your king includes as well as the categories and pages widgets and both are working smoothly. However, I just installed the search widget and have run upon an error. In the Where to Show section, just above the Show in Category option, there is an error message displayed:

    Warning: Missing argument 8 for widget_king_where_to_show() in /home/austinde/public_html/wptest/wp-content/plugins/king-includes/library/king_widget_functions.php on line 52

    A look at the functions file shows this as the line in question:

    function widget_king_where_to_show($widgetname,$number,$show_category,$category_id,$show_on_site_area,$show_not_on_site_area,$site_area,$site_area_id)

    I’m pretty much a php novice so I’m not really sure what’s missing here. Any ideas?


  17. 11.11.2006 at 2:58

    Fantastic, really like it keep up the great work.


  18. 01.11.2006 at 6:46

    Hallo, konnte das Framework und die widgets nur aktiveren, wenn ich den Pfad zur widgets.php in den include_once () Anweisungen als absolut gesetzt habe.

    include_once(ABSPATH . ‚wp-content/plugins/widgets/widgets.php‘);

    Ne Idee, was da falsch läuft?


  19. Kelunyang's Gravatar Kelunyang
    29.10.2006 at 12:23

    I have unzip king-framework(0.70) archive into my wordpress blog’s wp-content/plugins folder (I download the latest version from WordPress offical site),but there is no new item shown in my plugins page?
    Is this problem common to see? Because I no nothing about German, maybe someone have asked the same question in previous comments.
    thx ^^

  20. 27.10.2006 at 4:55

    Hi, I’d like to refer to David Latham’s comments 11 & 12 – he was missing a file that was causing the plugin not to show up in the wp plugins activation area. I’m getting the same problem but would like to know what file(s) were missing.

    Anyone else have the same problem and know?


  21. heo's Gravatar heo
    25.09.2006 at 19:01


    Ich habe gerade mein Blog auf Version 2.0.4 upgedatet, und wollte versuchen ob die King-Widgets jetzt schon laufen (siehe Post von oben; Vorschläge versucht aber leider ohne erfolgt).

    Aber ich bekomme eine neue Fehlermeldung, ev. sagt Euch die ja etwas;
    Fatal error: Cannot redeclare widget_king_admin_head() (previously declared in Pfad\wordpress\wp-content\plugins\king-includes\widgets_inc\library\king_widget_functions.php:28) in Pfad\wordpress\wp-content\plugins\king-includes\library\king_widget_functions.php on line 45

    Ich habe das aktuelle Framework heruntergeladen, gerade auch die neuen widgets.php und das ganze King-Includes volle Zugriffsrechte gegeben.
    Egal ob ich das King_Framework oder zB King_Login aktivieren möchte, immer diese Meldung.
    Ich verwende Windows XP mit SP2, MySQL 5.0.24a, Apache 2.2.3 und php 5.1.6


  22. Klaus's Gravatar Klaus
    04.09.2006 at 12:55

    Korregiere nochmals, nur die älteste Version ist mit den anderen Plugin lauffähig. 22.06.
    Ansonsten kommt es permament zu Header Fehlermeldungen.

    Schade eigentlich da es schöne Funktionen enthalten hat.

  23. Administrator's Gravatar Administrator
    04.09.2006 at 12:29

    danke für dein feedback, leider können wir nicht immer alle pluginkombinationen testen. ich werde mir die entsprechenden plugins mal ansehen.

  24. Klaus's Gravatar Klaus
    04.09.2006 at 12:22

    Hallo hier ein paar Test-Probleme
    Leider mit dem neuen Framework massive Probleme mit Plugin: aLink, Post-Level und PXS-mail.
    Zusätzlich gibt es jede Menge Header send Fehlermeldungen.
    Keines dieser anderen Plugins läßt sich mehr aktivieren, erst nach updaten auf Framework 0.68 läuft alles wieder normal.

    Leider gibt es jetzt Fehlermeldungen durch das neue King Kat. Also auch hier wieder alte Version einbauen ….

  25. 23.08.2006 at 16:08

    Just wanted to drop you a note letting you know I’ve got the Framework installed, as well as the Text Widget, the Links Widget and the Pages Widget, and to say they work great! Awesome for a newbie like me. Thanks for sharing!

  26. 11.08.2006 at 6:11


    First off I would like to say that the entire set of King Widgets that you have developed are absolutely amazing! They are by far the very best wordpress plugins out there.

    I am having some trouble using them, I emailed you at georg @ mediaprojekte DOT de a week ago with a detailed description of the problem, I just wanted to make sure that you received it.

    Thank You!


  27. 07.08.2006 at 18:29

    bitte im backoffice nur den firefox benutzen!

    die anzeige im frontend muss je nach template angepasst werden. dazu muss das html vor oder nach dem widget kontrolliert werden.

  28. Sebastian's Gravatar Sebastian
    07.08.2006 at 14:53

    ich würde gerne Deine Widgets einsetzen, habe aber leider ein paar Probleme (WP 2.0.4, Theme Binary Blue 1.4.0, aktuelle widgets.php installiert) :
    ohne King-Widgets : alles i.O.
    mit aktiviertem King-Includes: auch noch alles i.O.
    King-Text in die Sidebar (egal ob Includes aktiviert oder nicht): Sidebar Arrangement wird nach „Save Changes“ durcheinandergewirbelt angezeigt, alle Änderungen (egal bei welchem Widget) werden nicht gespeichert (und somit auch keine Texteingabe bei King-Text).
    Die einzige Änderung die ich in einigen php-Scripten vorgenommen habe war die include und require Pfade zu ändern (wegen open_basedir restrictions).

    Any ideas? Danke!

  29. 29.07.2006 at 12:16

    danke – so gehts. Anleitung lesen und ausschlafen :-)

  30. 29.07.2006 at 0:25

    ich bekomme auf der Seite immer einen Fehler von moo.fx.js – nämliche „this.el has no properties“.
    Sowohl im ie als auch im firefox.
    hat jemand einen Tip, wie ich das abstellen kann ?

  31. 21.07.2006 at 22:36

    For some reason I have not been able to identify, whenever I install this plugin (the whole king-includes folder) in /wp-content/plugins/ and try to activate it afterwards, it loads me a blank page with this URL:


    It happens both with IE and Firefox latest versions.

    I tried to restart my session with WP and at some point after many times I could see finally the plugins adminstration page, so I ended up thinking it was finally ok, and tried to install the Kins RSS plugin which is the one I would really like to install. I had no problems installing it, but when activating it again the problems arose. It gave me a memory_limit problem, so I am awaiting for the server admin to change it frmo 8 to 32.

    Meanwhile I tried to work with other plugins but I had to end up by deleting both of them, otherwise it wasn’t letting me even see the admin pages.

    Do you know what’s wrong?

    Thanks in advance.

  32. Administrator's Gravatar Administrator
    20.07.2006 at 0:12

    !!!!!!!!You are missing the widgets.php!!!!!!!
    READ the install instructions.

  33. 19.07.2006 at 23:00

    I tried to install and I get the following error in WP 2.0.3
    Warning: widget_king_links_register(widgets.php): failed to open stream: No such file or directory in /home/particle/public_html/wp-content/plugins/king-links.php on line 519

    Warning: widget_king_links_register(): Failed opening ‚widgets.php‘ for inclusion (include_path=‘.:/usr/lib/php:/usr/local/lib/php:.:.:.‘) in /home/particle/public_html/wp-content/plugins/king-links.php on line 519

  34. Administrator's Gravatar Administrator
    10.07.2006 at 15:37
  35. Don's Gravatar Don
    08.07.2006 at 7:34

    When will king pages be ready??
    Need it really bad.

  36. 06.07.2006 at 10:46


    This plugin looks useful but I wanted to ask a couple of questions before I download and start using it.

    Firstly is it in English please and if not will it be understandable!?

    Secondly I want to actually use it to place specific posts in specific places in the theme. A bit like this:
    Will it do that please?

    Many thanks


  37. 05.07.2006 at 6:25

    Ok, I managed to get it working. Found a missing file in my pack. Dont know why that was but it was missing. Its all good now.


  38. 05.07.2006 at 6:17

    I am unable to install the king-includes properly. It simply does not show in the admin area under plugins as an option to activate. I there for am unable to get the king-categories widget to show up in my sidebar. Please can you help me.

  39. 14.06.2006 at 0:09

    the widgets plugin’s README says it should be in /wp-content/plugins/widgets/scriptaculous

    And that’s where I have it. Where do you put it?

  40. MP:Schorsch's Gravatar MP:Schorsch
    13.06.2006 at 23:54

    I did not meant my js lib but the one provided with the widgets plugin

  41. 13.06.2006 at 23:50

    that sounds right, but I do have the js directory under wp-content/plugins/king-includes/

    looking at the source of the Widgets control panel, I see that it directs to the correct place and finds the .js files

  42. Administrator's Gravatar Administrator
    13.06.2006 at 22:47

    You are missing the Javascripts required for the AJAX Stuff!

  43. 13.06.2006 at 20:42

    When ever I use one of the new widgest the entire widget mechanism goes crazy. The main thing is that I can’t get into the config menu of any widget, even non-King widgets.

    Any idea why that might happen?

  44. 09.06.2006 at 22:24

    Gefixt. Alle Dateien des Frameworks müssen RW/R/R sein.
    Also zusätzlich musste ich die Dateien und evt. Ordner für Gruppe/Andere LESBAR setzen.

  45. 09.06.2006 at 22:14

    Ich habe das selbe wie heo. Benutze King-Text 0.63 und Framework 0.85. King-Text funktioniert wird nicht angezeigt im Pluginmenue, wenn ich die Berechtigung des phps nicht auf RW/R/R setze. Setze ich es aber auf RQ/R/R bekomme ich nur noch Weiß.

  46. heo's Gravatar heo
    21.05.2006 at 18:41

    ich verwende bereits die widgets text und categories.
    jetzt wollte ich calender und links hinzufügen, jedoch kommt nach dem aktiveren der plugins immer nur eine leere, weiße seite. auch beim aufruf von wordpress wird dann nur eine leere seite dargestellt.

    blog läuft wieder, ist ja recht einfach (plugin löschen).
    eine idee woran es liegen könnte bzw. was ich falsch gemacht haben könnte?
    ich verwende wp 2.0.2 mit dem standard_de_theme


  1. By on 05.07.2009 at 15:38
  2. By on 02.06.2009 at 8:25
  3. By on 11.03.2007 at 19:20
  4. By on 10.02.2007 at 9:45
  5. By on 23.01.2007 at 4:16
  6. By on 21.01.2007 at 16:57
  7. By on 18.12.2006 at 22:33
  8. By on 28.11.2006 at 0:10
  9. By on 06.11.2006 at 22:42
  10. By on 17.10.2006 at 19:21
  11. By on 26.08.2006 at 11:08
  12. By on 08.05.2006 at 13:00