<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WP Fun &#187; Widgets</title>
	<atom:link href="http://wp-fun.co.uk/tag/widgets/feed/" rel="self" type="application/rss+xml" />
	<link>http://wp-fun.co.uk</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Tue, 22 Jun 2010 18:05:32 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to build the new next generation theme</title>
		<link>http://wp-fun.co.uk/2009/03/26/how-to-build-the-new-next-generation-theme/</link>
		<comments>http://wp-fun.co.uk/2009/03/26/how-to-build-the-new-next-generation-theme/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 19:29:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Themery]]></category>
		<category><![CDATA[Themes]]></category>
		<category><![CDATA[Widgets]]></category>

		<guid isPermaLink="false">http://www.wp-fun.co.uk/?p=1146</guid>
		<description><![CDATA[How complex, or complicated, does a theme need to be to offer all the possible solutions that you want? I think it is possible to do it very very simply, with only one template page.
There are three widget based plugins which I think provide functionality so powerful that it is possible to create one index.php [...]]]></description>
			<content:encoded><![CDATA[<p class="introduction">How complex, or complicated, does a theme need to be to offer all the possible solutions that you want? I think it is possible to do it very very simply, with only one template page.</p>
<p>There are three widget based plugins which I think provide functionality so powerful that it is possible to create one index.php file with dynamic sidebars in key positions and to use widgets for everything else. Here are those plugins:</p>
<h3>Fun with theme widgets</h3>
<p>This is one of mine, and by far the simplest and least impressive of the three, but, it provides an incredibly simple way for theme builders or individuals to create their own widgets out of snippets of code.</p>
<p>You can <a href="http://www.wp-fun.co.uk/2008/12/06/fun-with-theme-widgets/">find out more about Fun with theme widgets here</a></p>
<h3>Query posts widget plugin</h3>
<p>This plugin by Justin Tadlock is most excellent. It allows you to include a list of posts by selecting the selection criteria. I see no reason why this shouldn&#8217;t be used instead of hard coding the page lists into the theme itself. If it supports paging and templates then even better.</p>
<p>You can <a href="http://justintadlock.com/archives/2009/03/15/query-posts-widget-wordpress-plugin">read more about Justin Tadlock&#8217;s Query post widget plugin here</a>.</p>
<h3>Widget context</h3>
<p>Kaspars widget context plugin adds the option to any widget to choose when it is displayed, i.e. home page, single post pages, when the URL contains certain characters etc. This is the killer plugin as, combined with the two above, it is no longer necessary to create individual post pages. Simply decide which widgets should go where.</p>
<p>You can r<a href="http://konstruktors.com/blog/web-design-work/wordpress-plugins/widget-context/">ead more about Kaspar&#8217;s Widget Context plugin here</a>.</p>
<h3>Presetting widgets</h3>
<p>It isn&#8217;t a plugin, but any theme using these combinations of plugins and widgets really needs the option to preset some widgets. <a href="http://ptahdunbar.com/wordpress/droppin-knowledge-on-wordpress-how-to-preset-widgets-to-widget-areas/">Ptah Dunbar recently wrote a post explaining how to preset widgets from within a theme</a> so this is a post well worth checking out.</p>
<p>Are these widgets the next step toward the ultimate WordPress theme system? I don&#8217;t know; what do you think?</p>
]]></content:encoded>
			<wfw:commentRss>http://wp-fun.co.uk/2009/03/26/how-to-build-the-new-next-generation-theme/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Reset your widgets</title>
		<link>http://wp-fun.co.uk/2009/03/04/rest-your-widgets/</link>
		<comments>http://wp-fun.co.uk/2009/03/04/rest-your-widgets/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 17:35:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Widgets]]></category>

		<guid isPermaLink="false">http://www.wp-fun.co.uk/?p=1132</guid>
		<description><![CDATA[I have written a few plugins that use widgets, and had a few support requests when some widgets disappear, often when upgrading or turning off a plugin. Justin Tadlock as now released a solution: a plugin that resets your widgets to remove them from all your sidebars.
I think it is a great idea, you can [...]]]></description>
			<content:encoded><![CDATA[<p class="introduction">I have written a few plugins that use widgets, and had a few support requests when some widgets disappear, often when upgrading or turning off a plugin. Justin Tadlock as now released a solution: a plugin that resets your widgets to remove them from all your sidebars.</p>
<p>I think it is a great idea, you can <a href="http://justintadlock.com/archives/2009/03/03/widgets-reset-wordpress-plugin">check out the widget reset plugin at Justin&#8217;s site</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://wp-fun.co.uk/2009/03/04/rest-your-widgets/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A new kind of widget</title>
		<link>http://wp-fun.co.uk/2009/01/28/a-new-kind-of-widget/</link>
		<comments>http://wp-fun.co.uk/2009/01/28/a-new-kind-of-widget/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 18:03:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Widgets]]></category>

		<guid isPermaLink="false">http://www.wp-fun.co.uk/?p=1123?evp=1123</guid>
		<description><![CDATA[A little while back I blogged about the need for a new kind of widget. Well Justin Tadlock has gone and made one. Check out the beta of his new Query Posts widget.
His widget lets you get a selection of posts based on your own criteria. Most of the query_posts options are there so if [...]]]></description>
			<content:encoded><![CDATA[<p class="introduction">A little while back I blogged about <a href="http://www.wp-fun.co.uk/2008/11/06/does-wordpress-need-a-better-type-of-widget/?evp=727">the need for a new kind of widget</a>. Well Justin Tadlock has gone and made one. Check out the beta of his n<a href="http://justintadlock.com/archives/2009/01/28/anybody-want-to-test-a-new-widget">ew Query Posts widget</a>.</p>
<p>His widget lets you get a selection of posts based on your own criteria. Most of the query_posts options are there so if you want most recent? easy. How about most recent from a particular category? Yep. Want to sort them in a different order? Want to sort according to the most recent category? want 5, 10, 15 or more? No problems.</p>
]]></content:encoded>
			<wfw:commentRss>http://wp-fun.co.uk/2009/01/28/a-new-kind-of-widget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Can you do without widgets?</title>
		<link>http://wp-fun.co.uk/2009/01/27/can-you-do-without-widgets/</link>
		<comments>http://wp-fun.co.uk/2009/01/27/can-you-do-without-widgets/#comments</comments>
		<pubDate>Tue, 27 Jan 2009 18:56:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Themery]]></category>
		<category><![CDATA[Widgets]]></category>

		<guid isPermaLink="false">http://www.wp-fun.co.uk/?p=1122?evp=1122</guid>
		<description><![CDATA[Brian Gardner has written a short post to show how he is improving the usability of his themes. He also says he intends to increase the widgetisation of the themes. The two images on this post shown so close together made me wonder if themers are taking widgets too far?
If you were designing a website [...]]]></description>
			<content:encoded><![CDATA[<p class="introduction">Brian Gardner has written a short post to show how he is <a href="http://www.briangardner.com/blog/snows-up-dude.htm">improving the usability of his themes</a>. He also says he intends to increase the widgetisation of the themes. The two images on this post shown so close together made me wonder if themers are taking widgets too far?</p>
<p>If you were designing a website (platform aside) for a customer you wouldn&#8217;t dream of just asking them to plonk the content where they wanted it. You would consider the available content, the interaction between that content, probably do some information architecture work on their existing content and present your final design as a fait accomplii, or near as damn it. You can&#8217;t do that with themes, but does that mean that all responsibility should be dumped on the consumer?</p>
<p>Seeing Brian Gardner&#8217;s UI for selecting categories made me wonder if the widgetised areas of the best themes would start to become more limited, with more thought given as to the optiminum positioning in any given layout. Say for example that you can choose the layout that you want, and then instead of choosing each individual widget you choose from combinations of content. For example, A main menu that works in a particular way is paired with a sub-menu in the sidebar, a search option in the header and lists of archives in the footer.</p>
<p>Might these themes also start to dictate the way the blog works, instead of the other way around, to help with visitor retention, or to drive focus to adverts, depending on theme? Consider a hard coded list of favourite posts. The blogger would be faced with the option of selecting their own favourite posts or leaving the list blank. If the theme was chosen for its carefully researched strategy surely he would go with the former?</p>
<p>I&#8217;m not suggesting that all themes would be widget free, but, just that uber-premium themes might win over normal themes because they do not provide control, they provide a strongly researched framework to help the blogger achieve their goals in the area they are targeting and limit their options for self fulfilled failure.</p>
<p>What do you think? Will themes continue on the never ending road of providing ultimate flexibility and removing structure, or will someone stop this merry-go-round with the intention of providing more?</p>
]]></content:encoded>
			<wfw:commentRss>http://wp-fun.co.uk/2009/01/27/can-you-do-without-widgets/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to add sidebars to a theme</title>
		<link>http://wp-fun.co.uk/2009/01/06/how-to-add-sidebars-to-a-theme/</link>
		<comments>http://wp-fun.co.uk/2009/01/06/how-to-add-sidebars-to-a-theme/#comments</comments>
		<pubDate>Tue, 06 Jan 2009 19:51:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Widgets]]></category>

		<guid isPermaLink="false">http://www.wp-fun.co.uk/?p=1053</guid>
		<description><![CDATA[As I might have mentioned once or twice, January is theme month at Fun with WordPress and I already have some interesting posts lined up thanks to everyone that has gotten in touch. For today&#8217;s post I have been asked to give a quick guide to adding dynamic sidebars(the widgety kind) to a theme, in [...]]]></description>
			<content:encoded><![CDATA[<p>As I might have mentioned once or twice, January is theme month at Fun with WordPress and I already have some interesting posts lined up thanks to everyone that has gotten in touch. For today&#8217;s post I have been asked to give a quick guide to adding dynamic sidebars(the widgety kind) to a theme, in particular horizontal sidebars.</p>
<p>There are three parts to adding extra sidebars to your theme:</p>
<ol>
<li>Register the sidebars in functions.php</li>
<li>Call the sidebars form the PHP</li>
<li>Add some extra styling to layout the sidebar</li>
</ol>
<h2>Register the sidebars</h2>
<p>Registering the sidebar is about more than just telling WordPress it exists. You also need to specify the structure of the sidebars. In this case I want to use a structure something like this:</p>
<p><img src="http://www.wp-fun.co.uk/wp-content/uploads/2009/01/widgetlayout.png" alt="widget layout" /></p>
<p>The wrapper div will be contained within the theme itself as it will have a specific ID based on its location. The remainder is specified in the array shown below:</p>
<p><strong>//create the array<br />
$sidebar_array = array(<br />
&#8216;before_widget&#8217; =&gt; &#8216;&lt;div id=&#8221;%1$s&#8221; class=&#8221;widget %2$s&#8221;&gt;&#8217;,<br />
&#8216;after_widget&#8217; =&gt; &#8216;&lt;/div&gt;&#8217;,<br />
&#8216;before_title&#8217; =&gt; &#8216;&lt;h2 class=&#8221;widgettitle&#8221;&gt;&#8217;,<br />
&#8216;after_title&#8217; =&gt; &#8216;&lt;/h2&gt;&#8217;,<br />
);</strong></p>
<p>In this you can see that the HTML specified in before_widget and after_widget wrap the widget in a DIV tag. %1s and %2s will be automatically replaced with the ID and title of the widget so they can be individual styled if necessary. before_title andafter_title wrap the title in H2 tags. The content will be specified by the widget.</p>
<p>Except for this styling there is only one more variable we need to provide that is the name of each sidebar. As this is separate for each of the sidebars we will need to modify the array twice. Each time just before the sidebar is registered with theRegister sidebar function. For example:</p>
<p><strong>//set the name<br />
$sidebar_array['name'] = &#8216;Sidebar&#8217;;<br />
register_sidebar($sidebar_array);<br />
$sidebar_array['name'] = &#8216;footer&#8217;;<br />
register_sidebar($sidebar_array);</strong></p>
<p>With these two sets of code included in functions.php you should now have two named sidebars available for widgets. But don&#8217;t add them yet.</p>
<h2>Call the sidebars</h2>
<p>The next step is to add the function calls in the HTML files. The function call itself is very simple: dynamic_sidebar(sidebar_name);, but for most themes you will want to do a little more to cope with situations where there are no widgets added, and to highlight where the widgetised areas are.</p>
<p>If there are no widgets then dynamic_sidebar will return false. This means you can easily add it as the equation in an IF statement like this:</p>
<p><strong>&lt;div id=&#8221;footer&#8221;&gt;&lt;?php if ( !dynamic_sidebar(&#8216;footer&#8217;) ) { ?&gt;&lt;p&gt;Sample Content&lt;/p&gt;&lt;?php } ?&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;</strong></p>
<p>In this example I have included some example content that will be shown if there are no widgets. In the default theme, and most others, this will contain a pre-widget sidebar. The default theme also checks to see whether widgets are installed at all. I am assuming they are, but check sidebar.php in the default theme to see how to check.</p>
<p>I have also added the wrapper DIV I mentioned above, this one for the footer, and a paragraph with a class of clear, so I can float the widgets and use this to clear them.</p>
<h2>Styles the sidebars</h2>
<p><img src="http://www.wp-fun.co.uk/wp-content/uploads/2009/01/wpfooter.png" alt="wpfooter" /></p>
<p>If you go ahead and add some widgets to the footer sidebar now you will find that they all appear above one another, like a normal sidebar. This is not what we want for a footer, so a little styling is needed. But only a little.</p>
<p><strong>#footer div.widget<br />
{<br />
float:left;<br />
margin-right:30px;<br />
margin-left:30px;<br />
}</strong></p>
<p><strong>#footer p.clear<br />
{<br />
line-height:0.001;<br />
font-size:0.001em;<br />
clear:both;<br />
}</strong></p>
<div>The CSS is really simple. If you look back at the initial array and widget layout diagram you see that each widget is surrounded by a div with the class of widget. This CSS floats each widget to the left if they are within the footer wrapper, and the paragraph with a class of clear makes sure the footer grows with the height of the widgets.</div>
<p>The example above is the default theme. To make it work in the default theme I also needed to alter another line of CSS. Line 83:</p>
<p><strong>//from</strong><strong><br />
background: #eee url(&#8216;images/kubrickfooter.jpg&#8217;) no-repeat top;<br />
//to</strong><strong><br />
background: url(&#8216;images/kubrickfooter.jpg&#8217;) no-repeat bottom;<br />
//create the array<br />
$sidebar_array = array(&#8216;before_widget&#8217; =&gt; &#8216;&lt;div id=&#8221;%1$s&#8221;&gt;&#8217;,'after_widget&#8217; =&gt; &#8216;&lt;/div&gt;&#8217;,'before_title&#8217; =&gt; &#8216;&lt;h2&gt;&#8217;,'after_title&#8217; =&gt; &#8216;&lt;/h2&gt;&#8217;,);</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://wp-fun.co.uk/2009/01/06/how-to-add-sidebars-to-a-theme/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>What should 2.8 bring?</title>
		<link>http://wp-fun.co.uk/2008/12/24/what-should-28-bring/</link>
		<comments>http://wp-fun.co.uk/2008/12/24/what-should-28-bring/#comments</comments>
		<pubDate>Wed, 24 Dec 2008 07:53:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[2.8]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[Widgets]]></category>

		<guid isPermaLink="false">http://www.wp-fun.co.uk/?p=991</guid>
		<description><![CDATA[Well, the inexorable drive toward the future continues with this post on the WordPress development blog about prioritising features for 2.8, and the associated survey. So I though I would take this opportunity to tell you what I think 2.8 should bring.
Widget Management
One of the options in the survey is widget management. I rated this [...]]]></description>
			<content:encoded><![CDATA[<p class="introduction">Well, the inexorable drive toward the future continues with this <a href="http://wordpress.org/development/2008/12/prioritizing-features-for-wordpress-28/">post on the WordPress development blog about prioritising features for 2.8</a>, and the <a href="http://www.polldaddy.com/s/6FC3E15CDE20B5B5/">associated survey</a>. So I though I would take this opportunity to tell you what I think 2.8 should bring.</p>
<h2>Widget Management</h2>
<p>One of the options in the survey is widget management. I rated this as most important out of the available options. But it isn&#8217;t just the <abbr title="User Interface">UI</abbr> that needs attention, although it does, as my post on <a href="http://www.wp-fun.co.uk/2008/12/05/widget-management-concepts/">widget management concepts</a> shows. If you have ever tried to do anything slightly advanced with widgets (see <a href="http://www.wp-fun.co.uk/fun-with-widget-structures-01-beta/">my widget structures plugin</a>) then the code requirde can drive you mad.</p>
<p>Right now it is far too difficult to code widgets. Single widgets are easy enough, although not easy for those without coding knowledge (that is why I created the <a href="http://www.wp-fun.co.uk/2008/12/06/fun-with-theme-widgets/">Fun with theme widgets</a> plugin), but multiple use widgets are horrible and require a huge amount of code that you need to copy almost verbatim. It isn&#8217;t so much a feature of WordPress as a hack the developers figured out and then provided as an example.</p>
<p>I think that all this stuff needs to be added to the core so that a multiple use widget requires setting a single variable in the add widget function. Alternatively, or perhaps better yet, provide a widget class that you extend to make the new widget.</p>
<p>Finally, I think they need to consider whether widgets can be produced using something other than code. Perhaps XML that can be imported. I write about this back at the start of November &#8211; <a href="http://www.wp-fun.co.uk/2008/11/06/does-wordpress-need-a-better-type-of-widget/">Does WordPress need a better type of widget?</a></p>
<h2>Modularisation</h2>
<p>This is the second major thing that I think WordPress needs to start doing, and I think should start doing in 2.8.</p>
<p>There are significant parts of WordPress that can be segregated out and put into core plugins. While these things do no harm if they are in the core and are not used it also means that you are limited to hooking into them, or rewriting them completely if you want to change them. I would like to see a system where you could copy the core plugin into user plugins, modify it, and then it would be a simple matter to make serious changes without modifying the core itself. Widgets would be a prime candidate for pluginisation as would links.</p>
</p>
<p>This may mean that the plugin system needs to be looked at to get the maximum performance out of it. But that is fine by me.</p>
<p>This is a very big project and that dovetails nicely with my feeling that they should really let 2.7 rest for a bit before replacing it. It is by far the most advanced (in terms of what users can do) system out there and I don&#8217;t think there is an immediate need to tinker with it beyond making major improvements.</p>
<h2>Sum</h2>
<p>WordPress has everything it needs right now. Having revamped the UI I think there is a need to step back and do the same for the underlying architecture and code. Considering where WordPress will go in the future. Should content management be the key, or better interaction with other blogs. And how about looking at which of the BuddyPress features should be plugins for WordPress as a whole.</p>
<p>The real things that are needed next are a focus on developers. This means modularisation, flexibility, and simplicity.</p>
<p>What do you think?</p>
]]></content:encoded>
			<wfw:commentRss>http://wp-fun.co.uk/2008/12/24/what-should-28-bring/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Fun with Theme Widgets</title>
		<link>http://wp-fun.co.uk/2008/12/06/fun-with-theme-widgets/</link>
		<comments>http://wp-fun.co.uk/2008/12/06/fun-with-theme-widgets/#comments</comments>
		<pubDate>Sat, 06 Dec 2008 18:00:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Themery]]></category>
		<category><![CDATA[Widgets]]></category>

		<guid isPermaLink="false">http://www.wp-fun.co.uk/?p=867</guid>
		<description><![CDATA[Following on from my post about Widget Management Concepts, I have produced a new plugin with the aim of making it super easy to include widgets within themes without needing to be concerned with writing plugins, or code in functions.php.
Installation
To install the plugin just download it and activate it. It has no options.
Creating Theme Widgets
Creating [...]]]></description>
			<content:encoded><![CDATA[<p class="introduction">Following on from my post about <a href="http://www.wp-fun.co.uk/2008/12/05/widget-management-concepts/">Widget Management Concepts</a>, I have produced a new plugin with the aim of making it super easy to include widgets within themes without needing to be concerned with writing plugins, or code in functions.php.</p>
<h2>Installation</h2>
<p>To install the plugin just download it and activate it. It has no options.</p>
<h2>Creating Theme Widgets</h2>
<p>Creating a theme widget really is very easy. Here is a step by step process.</p>
<h3>Step 1</h3>
<p>Create a new PHP file in the theme and call it <em>{something}.widget.php</em>.</p>
<h3>Step 2</h3>
<p>Add a PHP comment at the top of the file to indicate the name and description of the widget. Like this:</p>
<p><code>[php]<br />
<?php<br />
/*<br />
Widget Name: 3 Random Posts<br />
Widget Description: Outputs 3 random posts in a list<br />
*/<br />
?><br />
</code></p>
<h3>Step 3</h3>
<p>Add the code you want for your widget. In this example I am adding code to output three posts at random:</p>
<p><code>[php]<br />
<?php $postslist = get_posts('numberposts=3&#038;order=ASC&#038;orderby=rand'); ?></p>
<ul>
<?php foreach ($postslist as $post) : ?><br />
	<?php setup_postdata($post); ?></p>
<li>
	<strong><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></strong><br/><br />
	<?php the_excerpt(); ?>
	</li>
<p> <?php endforeach; ?>
</ul>
<p></code></p>
<p>Note that this code is identical to the code you would insert into a theme file to do this manually. There is nothing special about this code that needs to be changed to make it a widget.</p>
<h4>Step 4</h4>
<p>Assign the widget to sidebar.</p>
<p><img src="http://www.wp-fun.co.uk/wp-content/uploads/2008/12/workingwidget.png" alt="workingwidget" title="workingwidget" width="622" height="303" class="alignnone size-full wp-image-869" /></p>
<p>On the left of the image is the output (there is only one post because it is a fresh installation) on the right the widget added to the sidebar.</p>
<h2>Download</h2>
<p>You can <a href="http://wordpress.org/extend/plugins/fun-with-theme-widgets/">download the plugin from WordPress extend</a>.</p>
<h2>The Potential</h2>
<p>I think that making it this easy to create, and more importantly understand, the widgets included with a theme opens up a lot of possibilities. For example, with this it would be easy to use a sidebar and widgets to offer different layouts for a featured post on the home page.</p>
<p>If you have any suggestions for improvements to the plugin itself, or ideas about how it can be used, let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://wp-fun.co.uk/2008/12/06/fun-with-theme-widgets/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>Widget Management Concepts</title>
		<link>http://wp-fun.co.uk/2008/12/05/widget-management-concepts/</link>
		<comments>http://wp-fun.co.uk/2008/12/05/widget-management-concepts/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 07:31:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Widgets]]></category>

		<guid isPermaLink="false">http://www.wp-fun.co.uk/?p=845</guid>
		<description><![CDATA[Jeff Chandler wrote a post a few days ago explaining his vision for the WordPress widget system. His post got me thinking so I want to take his vision one step further and look at some of the practical methods of achieving them.
For a wireframe widget system to truly work the wireframe needs to be [...]]]></description>
			<content:encoded><![CDATA[<p class="introduction">Jeff Chandler wrote a post a few days ago explaining <a href="http://www.jeffro2pt0.com/idea-my-way-of-wordpress-widget-management">his vision for the WordPress widget system</a>. His post got me thinking so I want to take his vision one step further and look at some of the practical methods of achieving them.</p>
<p>For a wireframe widget system to truly work the wireframe needs to be set up by the theme author before hand. I envisage an area of WordPress.org where a theme author can upload a large screenshot of their theme, and using the tools provided, select the regions where the sidebars are placed. For example:</p>
<p><img src="http://www.wp-fun.co.uk/wp-content/uploads/2008/12/widgetgeneratorscript.jpg" alt="A theme screenshot with a selection being dragged out" width="425" height="234" style="border:1px solid #efefef"   /></p>
<p><small>The theme in this example is <a href="http://wordpress.org/extend/themes/clockworksimple">Clockwork Simple</a></small></p>
<p>For each region they select they provide a nice name, and the name of the sidebar within the theme so that WordPress can match them up later on. Once finished they are given an XML file containing the screenshot filename, the coordinates of each region, and the names of each sidebar. The XML file and large screen shot are saved within the theme folder.</p>
<p>When the user installs the theme and navigates to the widgets page they are presented with the list of widgets, as now, but instead of clicking add, they drag the widget to the location they want. For example:</p>
<p><img src="http://www.wp-fun.co.uk/wp-content/uploads/2008/12/widgetmockup.jpg" alt="Widget layout with widgets included" width="600" height="282" style="border:1px solid #efefef"  /></p>
<p>I think this process could really create a solid usable widget system, but I also think that more change is required to the process of creating a widget in the first place.</p>
<p>In the scenario described about, and which I wrote about in a previous post &mdash; <a href="http://www.wp-fun.co.uk/2007/11/13/doing-more-with-widgets-changing-layouts/">changing layouts using widgets</a>, many more places use widgets to provide options. For example, the main area could contain a single post widget, that is only used for single posts, a multiple post widget, for archives, and a page widget. These do away with the need for multiple template pages as each widget deals with one specific situation. The problem with this is that widgets are too hard to create.</p>
<p>Widgets are simple enough to create for a plugin author, but theme authors should be able to define a PHP file as a widget by adding some code at the top, in the same way as the CSS file contains the theme details.</p>
<p>If the want to create a single post layout with an image on the left they create it as a file and add the widget code. They can then do the same for a single post layout with the image on the right, a larger image with text below it, and so on, without needing to worry about the plugin style code that would be needed in functions.php right now.</p>
<p>In the next few days I will release a plugin that allows widgets to be created from theme files in this way so you can see for yourself how easy things could be. All we need now is the new font end. Roll on 2.8.</p>
]]></content:encoded>
			<wfw:commentRss>http://wp-fun.co.uk/2008/12/05/widget-management-concepts/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Does WordPress need a better type of widget?</title>
		<link>http://wp-fun.co.uk/2008/11/06/does-wordpress-need-a-better-type-of-widget/</link>
		<comments>http://wp-fun.co.uk/2008/11/06/does-wordpress-need-a-better-type-of-widget/#comments</comments>
		<pubDate>Thu, 06 Nov 2008 18:19:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Widgets]]></category>

		<guid isPermaLink="false">http://www.wp-fun.co.uk/?p=727</guid>
		<description><![CDATA[Jeff wrote a post to explain the differences between a widget and a plugin, and that got me thinking. Does WordPress need a system for creating widgets that doesn&#8217;t involve writing a plugin?
In my view there are two types of widget. A widget that gets data from WordPress, and a widget that gets data from [...]]]></description>
			<content:encoded><![CDATA[<p class="introduction">Jeff wrote a post to explain <a href="http://performancing.com/difference-between-plugin-and-widget">the differences between a widget and a plugin</a>, and that got me thinking. Does WordPress need a system for creating widgets that doesn&#8217;t involve writing a plugin?</p>
<p>In my view there are two types of widget. A widget that gets data from WordPress, and a widget that gets data from outside WordPress. In the first case some PHP will clearly be required, but the second? I think not.</p>
<p>There are a limited number of things that you might want to do to WordPress information when you display it in a widget. You may want to filter the data, combine two sets of data, limit the data, or add to the data, and you will usually want to do it to multiple records. Lastly you will want to create an HTML template, and a CSS template to use when outputing it.</p>
<p>It seems to me that these kinds of manipulations could be done with some kind of pseudo code, or even a simple UI so that all users can join in creating widgets, not just those that know how to write a plugin and use the WordPress API.</p>
<p>If you don&#8217;t know how to code PHP and if this kind of system was available is there any kind of widget that you would want, that you don&#8217;t have right now?</p>
]]></content:encoded>
			<wfw:commentRss>http://wp-fun.co.uk/2008/11/06/does-wordpress-need-a-better-type-of-widget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updated Plugin: Fun with Widget Structures</title>
		<link>http://wp-fun.co.uk/2008/10/22/updated-plugin-fun-with-widget-structures/</link>
		<comments>http://wp-fun.co.uk/2008/10/22/updated-plugin-fun-with-widget-structures/#comments</comments>
		<pubDate>Wed, 22 Oct 2008 17:30:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Widgets]]></category>

		<guid isPermaLink="false">http://www.wp-fun.co.uk/?p=675</guid>
		<description><![CDATA[A few days ago I gave a shout out for help on my beta plugin: Fun with widget structures. Kaspars, the guy who produces the competing tabbed widget plugin, very charitably came to my aid and corrected my mistake so the plugin errors are now solved.
Beta 2 of 0.1 is now available for download, for [...]]]></description>
			<content:encoded><![CDATA[<p class="introduction">A few days ago I gave a shout out for help on my beta plugin: Fun with widget structures. Kaspars, the guy who produces the competing <a href="http://konstruktors.com/blog/wordpress/458-tabbed-widgets-now-better-than-ever/">tabbed widget plugin</a>, very charitably came to my aid and corrected my mistake so the plugin errors are now solved.</p>
<p><a href="http://www.wp-fun.co.uk/fun-with-widget-structures-01-beta/">Beta 2 of 0.1 is now available for download</a>, for anyone to test. I&#8217;d love to hear your comments on it.</p>
<p>P.s. There is still time to <a href="http://www.wp-fun.co.uk/2008/10/20/poll-which-wordpress-sites-do-you-visit-regularly/">complete the poll on the WordPress focussed sites you visit regularly</a>. I&#8217;ve had a great response so far.</p>
]]></content:encoded>
			<wfw:commentRss>http://wp-fun.co.uk/2008/10/22/updated-plugin-fun-with-widget-structures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
