<?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"
	>
<channel>
	<title>Comments on: Wordpress Tip: How to Create a Plugin to Help Automate a Complicated Theme</title>
	<atom:link href="http://www.cagintranet.com/archive/wordpress-tip-how-to-create-a-plugin-to-help-automate-a-complicated-theme/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cagintranet.com/archive/wordpress-tip-how-to-create-a-plugin-to-help-automate-a-complicated-theme/</link>
	<description>Pittsburgh Web Design » Cagintranet Web Design - Web Designer, Developer, Graphic Artist and Web 2.0 Guru</description>
	<pubDate>Wed, 20 Aug 2008 02:52:18 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
		<item>
		<title>By: Cal</title>
		<link>http://www.cagintranet.com/archive/wordpress-tip-how-to-create-a-plugin-to-help-automate-a-complicated-theme/#comment-845</link>
		<dc:creator>Cal</dc:creator>
		<pubDate>Fri, 18 Jul 2008 18:40:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.cagintranet.com/?p=68#comment-845</guid>
		<description>Thanks Chris! I'm going to have fun playing with this tonight..... :)</description>
		<content:encoded><![CDATA[<p>Thanks Chris! I&#039;m going to have fun playing with this tonight&#8230;.. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Cagle</title>
		<link>http://www.cagintranet.com/archive/wordpress-tip-how-to-create-a-plugin-to-help-automate-a-complicated-theme/#comment-841</link>
		<dc:creator>Chris Cagle</dc:creator>
		<pubDate>Fri, 18 Jul 2008 14:50:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.cagintranet.com/?p=68#comment-841</guid>
		<description>@Cal - Thanks for doing my testing for me... :) I fixed it. It was that WP suggests that we wrap each update_option in the function function mythemeopt_update_options() in an if statement, but doing it that way doesn't validate null fields. I've updated the source code in the example and the tutorial.

What you want to do will be done from within the theme, and not the plugin itself. In your theme template file, where you echo the theme option value, do it like this:
&lt;pre&gt;&lt;code class="php"&gt;&lt;?php 
if ($mythemeopt_current_date)  {
   echo $mythemeopt_current_date;
} else {
   echo "This would be my default stuff";
};
?&gt;&lt;/code&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>@Cal - Thanks for doing my testing for me&#8230; :) I fixed it. It was that WP suggests that we wrap each update_option in the function function mythemeopt_update_options() in an if statement, but doing it that way doesn&#039;t validate null fields. I&#039;ve updated the source code in the example and the tutorial.</p>
<p>What you want to do will be done from within the theme, and not the plugin itself. In your theme template file, where you echo the theme option value, do it like this:</p>
<pre><code class="php">< ?php
if ($mythemeopt_current_date)  {
   echo $mythemeopt_current_date;
} else {
   echo "This would be my default stuff";
};
?></code></pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cal</title>
		<link>http://www.cagintranet.com/archive/wordpress-tip-how-to-create-a-plugin-to-help-automate-a-complicated-theme/#comment-819</link>
		<dc:creator>Cal</dc:creator>
		<pubDate>Fri, 18 Jul 2008 03:36:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.cagintranet.com/?p=68#comment-819</guid>
		<description>Hey Chris,
Trying it again, I delete the text in the field and press update but the text remains there, I get no error message or anything. So I guess the box has to have something in it at all times? 

I was also curious if there's a way to put in the theme something like: 
IF (box has something in it)
Echo what's in the box
ELSE
Output this default stuff I have

I'm a horrible programmer so sorry if that's a simple or silly question!</description>
		<content:encoded><![CDATA[<p>Hey Chris,<br />
Trying it again, I delete the text in the field and press update but the text remains there, I get no error message or anything. So I guess the box has to have something in it at all times? </p>
<p>I was also curious if there&#039;s a way to put in the theme something like:<br />
IF (box has something in it)<br />
Echo what&#039;s in the box<br />
ELSE<br />
Output this default stuff I have</p>
<p>I&#039;m a horrible programmer so sorry if that&#039;s a simple or silly question!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Cagle</title>
		<link>http://www.cagintranet.com/archive/wordpress-tip-how-to-create-a-plugin-to-help-automate-a-complicated-theme/#comment-774</link>
		<dc:creator>Chris Cagle</dc:creator>
		<pubDate>Wed, 16 Jul 2008 11:51:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.cagintranet.com/?p=68#comment-774</guid>
		<description>@Cal - Which field does this for you? I just did a quick look-through and i don't see any problems (that definitely doesn't meant that there aren't any ;)</description>
		<content:encoded><![CDATA[<p>@Cal - Which field does this for you? I just did a quick look-through and i don&#039;t see any problems (that definitely doesn&#039;t meant that there aren&#039;t any ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cal</title>
		<link>http://www.cagintranet.com/archive/wordpress-tip-how-to-create-a-plugin-to-help-automate-a-complicated-theme/#comment-718</link>
		<dc:creator>cal</dc:creator>
		<pubDate>Fri, 11 Jul 2008 23:14:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.cagintranet.com/?p=68#comment-718</guid>
		<description>Hey Chris, thanks for the article it helps non-programmers like me a lot. Using your plugin as-is I tried to delete my entry in the admin and it doesn't work. I insert some text like "blah blah" and it updates fine but when I try and remove "blah blah" and update it says it's unable to update... 

Anyways thanks for the great article I'll be coming back to it often I'm sure.</description>
		<content:encoded><![CDATA[<p>Hey Chris, thanks for the article it helps non-programmers like me a lot. Using your plugin as-is I tried to delete my entry in the admin and it doesn&#039;t work. I insert some text like &#034;blah blah&#034; and it updates fine but when I try and remove &#034;blah blah&#034; and update it says it&#039;s unable to update&#8230; </p>
<p>Anyways thanks for the great article I&#039;ll be coming back to it often I&#039;m sure.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
