<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: The complete guide to creating widgets in WordPress 2.8</title>
	<atom:link href="http://justintadlock.com/archives/2009/05/26/the-complete-guide-to-creating-widgets-in-wordpress-28/feed" rel="self" type="application/rss+xml" />
	<link>http://justintadlock.com/archives/2009/05/26/the-complete-guide-to-creating-widgets-in-wordpress-28</link>
	<description>Life, Blogging, and WordPress</description>
	<lastBuildDate>Mon, 15 Mar 2010 03:25:01 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: 11 Most Common Wordpress Posts &#124; New 2 Wp</title>
		<link>http://justintadlock.com/archives/2009/05/26/the-complete-guide-to-creating-widgets-in-wordpress-28#comment-180723</link>
		<dc:creator>11 Most Common Wordpress Posts &#124; New 2 Wp</dc:creator>
		<pubDate>Tue, 09 Mar 2010 07:51:27 +0000</pubDate>
		<guid isPermaLink="false">http://justintadlock.com/?p=1646#comment-180723</guid>
		<description>[...] Widgets   JUSTIN TADLOCK   LONE WOLF DESIGNS   VALUMS   EMANUEL EFERONATO   XAVISYS   WP [...]</description>
		<content:encoded><![CDATA[<p>[...] Widgets   JUSTIN TADLOCK   LONE WOLF DESIGNS   VALUMS   EMANUEL EFERONATO   XAVISYS   WP [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bookmarks for February 16th from 22:43 to 22:43 &#124; Brewerj Web Design</title>
		<link>http://justintadlock.com/archives/2009/05/26/the-complete-guide-to-creating-widgets-in-wordpress-28#comment-178145</link>
		<dc:creator>Bookmarks for February 16th from 22:43 to 22:43 &#124; Brewerj Web Design</dc:creator>
		<pubDate>Tue, 16 Feb 2010 23:12:22 +0000</pubDate>
		<guid isPermaLink="false">http://justintadlock.com/?p=1646#comment-178145</guid>
		<description>[...] The complete guide to creating widgets in WordPress 2.8 &#8211; Our widget will display a person&#8217;s name and sex. The controls will allow for the input of a widget title (text input), the input of the user&#8217;s name (text input), the selection of the person&#8217;s sex (select box), and whether the sex should be shown publicly (checkbox). [...]</description>
		<content:encoded><![CDATA[<p>[...] The complete guide to creating widgets in WordPress 2.8 &#8211; Our widget will display a person&rsquo;s name and sex. The controls will allow for the input of a widget title (text input), the input of the user&rsquo;s name (text input), the selection of the person&rsquo;s sex (select box), and whether the sex should be shown publicly (checkbox). [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: frq</title>
		<link>http://justintadlock.com/archives/2009/05/26/the-complete-guide-to-creating-widgets-in-wordpress-28#comment-177784</link>
		<dc:creator>frq</dc:creator>
		<pubDate>Sat, 13 Feb 2010 02:28:26 +0000</pubDate>
		<guid isPermaLink="false">http://justintadlock.com/?p=1646#comment-177784</guid>
		<description>Mike, I don&#039;t know exactly what you want to do, but you might want to take a look at this plugin: http://wordpress.org/extend/plugins/exec-php/

Cheers,
frq.</description>
		<content:encoded><![CDATA[<p>Mike, I don&#8217;t know exactly what you want to do, but you might want to take a look at this plugin: <a href="http://wordpress.org/extend/plugins/exec-php/" rel="nofollow">http://wordpress.org/extend/plugins/exec-php/</a></p>
<p>Cheers,<br />
frq.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: frq</title>
		<link>http://justintadlock.com/archives/2009/05/26/the-complete-guide-to-creating-widgets-in-wordpress-28#comment-177783</link>
		<dc:creator>frq</dc:creator>
		<pubDate>Sat, 13 Feb 2010 02:24:42 +0000</pubDate>
		<guid isPermaLink="false">http://justintadlock.com/?p=1646#comment-177783</guid>
		<description>Well, i&#039;ve put some ?php tags that got stripped out my comment. My bad. Here is the change in the code on line 136, inside the php tags of the checked part:
from:

&lt;pre&gt;&lt;code&gt;checked( $instance[&#039;show_sex&#039;], true );&lt;/code&gt;&lt;/pre&gt;

to:

&lt;pre&gt;&lt;code&gt;checked(isset( $instance[&#039;show_sex&#039;]) ? $instance[&#039;show_sex&#039;] : 0  );&lt;/code&gt;&lt;/pre&gt;

frq.</description>
		<content:encoded><![CDATA[<p>Well, i&#8217;ve put some ?php tags that got stripped out my comment. My bad. Here is the change in the code on line 136, inside the php tags of the checked part:<br />
from:</p>
<pre><code>checked( $instance['show_sex'], true );</code></pre>
<p>to:</p>
<pre><code>checked(isset( $instance['show_sex']) ? $instance['show_sex'] : 0  );</code></pre>
<p>frq.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: frq</title>
		<link>http://justintadlock.com/archives/2009/05/26/the-complete-guide-to-creating-widgets-in-wordpress-28#comment-177782</link>
		<dc:creator>frq</dc:creator>
		<pubDate>Sat, 13 Feb 2010 02:20:46 +0000</pubDate>
		<guid isPermaLink="false">http://justintadlock.com/?p=1646#comment-177782</guid>
		<description>Hello, Justin, I know this article has been out for a while, but it really helped me. Thanks very much.

I noticed something though. My checkbox was not updating and was off all the time. I changed a little the code (copied from the default Text Widget) to something like this:
line 97, from:

&lt;pre&gt;&lt;code&gt;$instance[&#039;show_sex&#039;] = $new_instance[&#039;show_sex&#039;];&lt;/code&gt;&lt;/pre&gt;

to:

&lt;pre&gt;&lt;code&gt;$instance[&#039;show_sex&#039;] = isset($new_instance[&#039;show_sex&#039;]);&lt;/code&gt;&lt;/pre&gt;

line 136, just the checked part of it, from:

to:

Then it started working. I don&#039;t know if it has something to do with 2.9, but it worked for me that way.

Thanks again,
frq.

PS: Checking my writing for the last time before hitting the submit button got me wondering what one might think seeing just these lines of code with a variable called $show_sex ;-)</description>
		<content:encoded><![CDATA[<p>Hello, Justin, I know this article has been out for a while, but it really helped me. Thanks very much.</p>
<p>I noticed something though. My checkbox was not updating and was off all the time. I changed a little the code (copied from the default Text Widget) to something like this:<br />
line 97, from:</p>
<pre><code>$instance['show_sex'] = $new_instance['show_sex'];</code></pre>
<p>to:</p>
<pre><code>$instance['show_sex'] = isset($new_instance['show_sex']);</code></pre>
<p>line 136, just the checked part of it, from:</p>
<p>to:</p>
<p>Then it started working. I don&#8217;t know if it has something to do with 2.9, but it worked for me that way.</p>
<p>Thanks again,<br />
frq.</p>
<p>PS: Checking my writing for the last time before hitting the submit button got me wondering what one might think seeing just these lines of code with a variable called $show_sex <img src='http://justintadlock.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Smith</title>
		<link>http://justintadlock.com/archives/2009/05/26/the-complete-guide-to-creating-widgets-in-wordpress-28#comment-177698</link>
		<dc:creator>Mike Smith</dc:creator>
		<pubDate>Fri, 12 Feb 2010 03:33:35 +0000</pubDate>
		<guid isPermaLink="false">http://justintadlock.com/?p=1646#comment-177698</guid>
		<description>Shit, sorry about commenting again so soon Justin.

I&#039;ve got the widget working, but had a question. For those who want to write php codes directly into their theme without using a widget, how would I go about this? I know the code should be like this normally:

if(function_exists(&#039;function-name&#039;)) { function-name(); }

But I can&#039;t seem to figure out which function name I&#039;m suppose to use and also, inside the function-name() I&#039;d love to be able to allow the users to add their own name/sex right inside (ie: function-name(&#039;mike&#039;,&#039;male&#039;);

Is this a simple fix, or something that takes a fair bit of editing?

Thanks for any help you can give Justin.</description>
		<content:encoded><![CDATA[<p>Shit, sorry about commenting again so soon Justin.</p>
<p>I&#8217;ve got the widget working, but had a question. For those who want to write php codes directly into their theme without using a widget, how would I go about this? I know the code should be like this normally:</p>
<p>if(function_exists(&#8216;function-name&#8217;)) { function-name(); }</p>
<p>But I can&#8217;t seem to figure out which function name I&#8217;m suppose to use and also, inside the function-name() I&#8217;d love to be able to allow the users to add their own name/sex right inside (ie: function-name(&#8216;mike&#8217;,'male&#8217;);</p>
<p>Is this a simple fix, or something that takes a fair bit of editing?</p>
<p>Thanks for any help you can give Justin.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Smith</title>
		<link>http://justintadlock.com/archives/2009/05/26/the-complete-guide-to-creating-widgets-in-wordpress-28#comment-177689</link>
		<dc:creator>Mike Smith</dc:creator>
		<pubDate>Fri, 12 Feb 2010 00:49:34 +0000</pubDate>
		<guid isPermaLink="false">http://justintadlock.com/?p=1646#comment-177689</guid>
		<description>I&#039;m putting this to good use for my theme site. Thanks for posting this up. I&#039;ve customized it a bit. Once it&#039;s released, I&#039;ll shoot you a link. I appreciate you putting this article up, without it I would have been lost :)</description>
		<content:encoded><![CDATA[<p>I&#8217;m putting this to good use for my theme site. Thanks for posting this up. I&#8217;ve customized it a bit. Once it&#8217;s released, I&#8217;ll shoot you a link. I appreciate you putting this article up, without it I would have been lost <img src='http://justintadlock.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: virg</title>
		<link>http://justintadlock.com/archives/2009/05/26/the-complete-guide-to-creating-widgets-in-wordpress-28#comment-177182</link>
		<dc:creator>virg</dc:creator>
		<pubDate>Sat, 06 Feb 2010 06:17:21 +0000</pubDate>
		<guid isPermaLink="false">http://justintadlock.com/?p=1646#comment-177182</guid>
		<description>It works! Thanks.

Is there a way to just add some default php code in the widget? I&#039;m trying to create widget that will show subpages.</description>
		<content:encoded><![CDATA[<p>It works! Thanks.</p>
<p>Is there a way to just add some default php code in the widget? I&#8217;m trying to create widget that will show subpages.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin Tadlock</title>
		<link>http://justintadlock.com/archives/2009/05/26/the-complete-guide-to-creating-widgets-in-wordpress-28#comment-177040</link>
		<dc:creator>Justin Tadlock</dc:creator>
		<pubDate>Thu, 04 Feb 2010 11:11:22 +0000</pubDate>
		<guid isPermaLink="false">http://justintadlock.com/?p=1646#comment-177040</guid>
		<description>There&#039;s always someone that doesn&#039;t read &lt;em&gt;all&lt;/em&gt; of the post title: &lt;em&gt;The complete guide to &lt;strong&gt;creating widgets&lt;/strong&gt; in WordPress 2.8&lt;/em&gt;.  I said nothing about it being a guide to registering widgets.

Nevertheless, how to get your widget to show in the widgets admin is clearly described in the tutorial above.  Actually, it&#039;s the first step. ;)</description>
		<content:encoded><![CDATA[<p>There&#8217;s always someone that doesn&#8217;t read <em>all</em> of the post title: <em>The complete guide to <strong>creating widgets</strong> in WordPress 2.8</em>.  I said nothing about it being a guide to registering widgets.</p>
<p>Nevertheless, how to get your widget to show in the widgets admin is clearly described in the tutorial above.  Actually, it&#8217;s the first step. <img src='http://justintadlock.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://justintadlock.com/archives/2009/05/26/the-complete-guide-to-creating-widgets-in-wordpress-28#comment-176998</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Thu, 04 Feb 2010 00:14:25 +0000</pubDate>
		<guid isPermaLink="false">http://justintadlock.com/?p=1646#comment-176998</guid>
		<description>Thanks for the tutorial, but I&#039;d hardly call it the complete guide as you do not mention how to make it visible in the add widget screen.</description>
		<content:encoded><![CDATA[<p>Thanks for the tutorial, but I&#8217;d hardly call it the complete guide as you do not mention how to make it visible in the add widget screen.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
