WordPress Widget: King Text (+php) (+html)
"Another Text Widget? Why the hell would i need that?"
Well read on and it might convince you.
Version 0.69 NEW Features
– Randomize Widget Content. Split the content with the <!–more–> Tag and it will shuffle the text or php code inside.
– Remote Version checking
– Where NOT to show. Select Side Area where the widget is not be shown on (i.e. everywhere but Home) this can be combined with the show in category
– changed the license type
– 20 Text Boxes
– set HTML before/after seperatly for each Widget OR takes widget before/after HTML from functions.php if left empty
– Menu in which Website Area to show the Widget on. New Options are:
- show on Home / Search / Archive or 404 page
- show on all or special single Page. You can set the id or slug of the Page where to show
- show on all or special single Article You can set the id or slug of the Article where to show
- show on all or special Category Listing You can set the id of the Category where to show
- Show if inside a special Category. If in list List or on single Article
You find all Options explained in the WordPress Codex in Conditional Tags make sure to definitly read this if you are using those Options!
– new ajax menu
– Choose whether to have php or just html in the widget. With php in the widget you can for example use any WordPress call. So if you are missing any WordPress or Plugin functions in widgets insert them there.
– choose in which category the widget shall appear
– 4 html fields to custmize html before/after widget and title
– based on the king widget framework
– Fully localizable with gettext Translation (German Translation included)
German and English Admin Screens (Version 0.6+ foldable menu, updated screens are comming)
– Randomly show box Content devided by <!–more–> Tag like in AdRotator. so you also rotate php code or anything else
– Option to show widget to a specific Role -> use wordpress capabilities (I will give this a priority if someone asks/pays for it)
– set initial JS Open or Close State + JS Open/Close Time
– make use of is_home / is_single or other conditional tags -> what do you think?
– What else would you like to see? Please comment!
Of course you should have wordpress widgets installed and activated. If not, you can find the download and install instructions over at automattic.com
– Copy king_text.php into your plugins widget folder -> where your widgets.php is !!!
– Copy the King Widget Framework in /king-includes into /plugins if you have not already another King Widget installed
– activate in Pluginarea.
– Drag the King Text Widget on one of your sidebars and play with the options.
Show Content Randomly
– insert the <!–more–> tag between you text or php content
Use JS Slide Open/Close
Here are the steps to be taken. If you don´t understand those you can simply forget about this function
2. go to the text widget html options and activate "Use Sliding Box"
3. The difficult part:
You have to fill the custom html options fields(or use this inside the textbox). The Box needs to be wrapped in a collappsible elemet(div/li/p) with aspecial ID and you have to give the click event to some element. Since this can vary with your blogtemplate i left this up to you.
Standart Options which should work with the default Template: (please check the " when copy/paste)
HTML Before Widget: <li>
HTML before widget Title: <h2 onClick="textslide1.toggle();" ><li>
HTML after widget Title: </h2><div id="text1">
HTML after widget: </div></li>
When you have multiple Boxes you just have to adapt the numbers in textslide1.toggle -> textslide2.toggle and of course the id text1 -> text2
For Version 0.69 you also need to get the changed King Widget Framework which is now available separate.
After upgrading your framework just replace king-test.php with the new one. Your textboxes content should remain unchanged.
don´t forget to get the king-widget framework Version 0.68 or greater.
Please don´t hesitate to give me a feedback if this is usefull or if you think you found a bug!