<?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>Ben Huson &#187; Widgets</title>
	<atom:link href="http://www.benhuson.co.uk/tag/widgets/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.benhuson.co.uk</link>
	<description>Web Designer and Developer</description>
	<lastBuildDate>Mon, 06 Feb 2012 14:41:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>WordPress 2.8 Widget API</title>
		<link>http://www.benhuson.co.uk/2009/06/14/wordpress-28-widget-api/</link>
		<comments>http://www.benhuson.co.uk/2009/06/14/wordpress-28-widget-api/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 09:39:48 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Web Developer]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Widgets]]></category>

		<guid isPermaLink="false">http://www.benhuson.co.uk/?p=801</guid>
		<description><![CDATA[Tweet I love the new widgets API in WordPress 2.8 I followed the excellent tutorial at WPengineer.com which gives a great overview about how to create a widget using the new API. Initially, the widget I created by following the guide seemed to &#8216;crash&#8217; WordPress when I installed it. After a little investigation I tracked [...]]]></description>
			<content:encoded><![CDATA[
<!-- This is the start of the WP Twitter Button code -->
<div id="rk_wp_twitter_button" style="margin: 0px 0px 0px 0px; float: left"><a href="http://redirectingat.com?id=3206X604054&xs=1&url=http%3A%2F%2Ftwitter.com%2Fshare&sref=rss" class="twitter-share-button" data-url="http://www.benhuson.co.uk/2009/06/14/wordpress-28-widget-api/" data-count="horizontal" data-via="benhuson">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div>
<!-- This is the end of the WP Twitter Button code -->

 
<span class = "facebook-like" style = "height: 25px;  "><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.benhuson.co.uk/2009/06/14/wordpress-28-widget-api/&layout=button_count&send=false&show_faces=false&width=&action=like&colorscheme=light&font=lucida grande" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:px; height:25px"></iframe></span><p><strong>I love the new widgets API in <a href="http://redirectingat.com?id=3206X604054&xs=1&url=http%3A%2F%2Fwordpress.org%2Fdevelopment%2F2009%2F06%2Fwordpress-28%2Ftrackback%2F&sref=rss">WordPress 2.8</a></strong></p>
<p>I followed the excellent tutorial at <a href="http://redirectingat.com?id=3206X604054&xs=1&url=http%3A%2F%2Fwpengineer.com%2Fwordpress-built-a-widget%2Ftrackback%2F&sref=rss">WPengineer.com</a> which gives a great overview about how to create a widget using the new API. Initially, the widget I created by following the guide seemed to &#8216;crash&#8217; WordPress when I installed it. After a little investigation I tracked this down to the following&#8230;</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> widget_myuniquewidget_register<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   register_sidebar_widget<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'My Unique Widget'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'widget_myuniquewidget'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">&lt;</span>strong<span style="color: #339933;">&gt;</span>add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'init'</span><span style="color: #339933;">,</span> widget_myuniquewidget_register<span style="color: #009900;">&#41;</span><span style="color: #339933;">;&lt;/</span>strong<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>You <strong>must</strong> initialise the register_sidebar_widget function by hooking into the &#8216;init&#8217; action. Failure to do so means the function is called too early which will cause problems. For more information read <a href="http://redirectingat.com?id=3206X604054&xs=1&url=http%3A%2F%2Fcodex.wordpress.org%2FWordPress_Widgets_Api&sref=rss">WordPress Widgets API</a> on the WordPress Codex.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benhuson.co.uk/2009/06/14/wordpress-28-widget-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stylish Categories for WP e-Commerce</title>
		<link>http://www.benhuson.co.uk/2009/04/22/stylish-categories-for-wp-e-commerce/</link>
		<comments>http://www.benhuson.co.uk/2009/04/22/stylish-categories-for-wp-e-commerce/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 22:51:45 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Developer]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Categories]]></category>
		<category><![CDATA[E-commerce]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Widgets]]></category>
		<category><![CDATA[WP e-Commerce]]></category>

		<guid isPermaLink="false">http://www.benhuson.co.uk/?p=724</guid>
		<description><![CDATA[Tweet I&#8217;ve made my first contribution to the WP e-Commerce plugin &#8211; my first contribution to an open source project&#8230; It&#8217;s a great e-commerce plugin for WordPress but there were a few visual things niggling me that I thought should be sorted out &#8211; mainly the way that the widget for showing categories was not [...]]]></description>
			<content:encoded><![CDATA[
<!-- This is the start of the WP Twitter Button code -->
<div id="rk_wp_twitter_button" style="margin: 0px 0px 0px 0px; float: left"><a href="http://redirectingat.com?id=3206X604054&xs=1&url=http%3A%2F%2Ftwitter.com%2Fshare&sref=rss" class="twitter-share-button" data-url="http://www.benhuson.co.uk/2009/04/22/stylish-categories-for-wp-e-commerce/" data-count="horizontal" data-via="benhuson">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div>
<!-- This is the end of the WP Twitter Button code -->

 
<span class = "facebook-like" style = "height: 25px;  "><iframe src="http://www.facebook.com/plugins/like.php?href=http://www.benhuson.co.uk/2009/04/22/stylish-categories-for-wp-e-commerce/&layout=button_count&send=false&show_faces=false&width=&action=like&colorscheme=light&font=lucida grande" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:px; height:25px"></iframe></span><p><strong>I&#8217;ve made my first contribution to the <a href="http://redirectingat.com?id=3206X604054&xs=1&url=http%3A%2F%2Fwww.instinct.co.nz%2Fe-commerce%2F&sref=rss">WP e-Commerce</a> plugin &#8211; my first contribution to an open source project&#8230;</strong></p>
<p>It&#8217;s a great e-commerce plugin for WordPress but there were a few visual things niggling me that I thought should be sorted out &#8211; mainly the way that the widget for showing categories was not styled the same way as the WordPress default widgets.</p>
<p>Fixing the issue was just a case of making a couple of tweaks to the HTML; changing some square brackets to normal brackets and removing some bold styling.</p>
<p>Nothing revolutionary there, but it should now look a whole lot better with your default WordPress theme without making any modifications&#8230;</p>
<p>The current version in development <a href="http://redirectingat.com?id=3206X604054&xs=1&url=http%3A%2F%2Fwww.instinct.co.nz%2Fwp-e-commerce-37-questions%2Ftrackback%2F&sref=rss">WP e-Commerce 3.7</a> is looking great, with an overhaul of the user interface to bring it into line with WordPress 2.7, a complete reorganisation of the code making it easier for us developers, and a new template engine which works along the same lines at the WordPress Loop so that theme authors can now get in on the act without having to delve too far into the plugin&#8217;s code.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benhuson.co.uk/2009/04/22/stylish-categories-for-wp-e-commerce/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

