<?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>scriptygoddess</title>
	<atom:link href="http://www.scriptygoddess.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scriptygoddess.com</link>
	<description></description>
	<lastBuildDate>Tue, 24 Aug 2010 13:58:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>WordCamp Utah 2010</title>
		<link>http://www.scriptygoddess.com/archives/2010/07/20/wordcamp-utah-2010/</link>
		<comments>http://www.scriptygoddess.com/archives/2010/07/20/wordcamp-utah-2010/#comments</comments>
		<pubDate>Wed, 21 Jul 2010 02:25:54 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[Announcements]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1643</guid>
		<description><![CDATA[I&#039;m proud to announce that I&#039;ll be speaking at WordCamp Utah 2010. My session will be about using WordPress as a CMS &#8211; I&#039;ll be referencing various projects where I have done so and explain how and what I did. Registration is now open, so I hope you&#039;ll be attending too. I&#039;m still putting my [...]


Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2010/06/23/new-wordpress-3-0-navigation-menus-what-you-need-to-know-to-get-started/' rel='bookmark' title='Permanent Link: New WordPress 3.0 Navigation Menus &#8211; What you need to know to get started'>New WordPress 3.0 Navigation Menus &#8211; What you need to know to get started</a> <small>One feature I&#039;m extremely excited to see in WordPress 3.0...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>I&#039;m proud to announce that I&#039;ll be speaking at <a href="http://2010.utah.wordcamp.org/">WordCamp Utah 2010</a>. My session will be about using WordPress as a CMS &#8211; I&#039;ll be referencing various projects where I have done so and explain how and what I did. Registration is now open, so I hope you&#039;ll be attending too. I&#039;m still putting my presentation together and would love to know what questions you have on this topic that you hope would be answered.</p>


<p>Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2010/06/23/new-wordpress-3-0-navigation-menus-what-you-need-to-know-to-get-started/' rel='bookmark' title='Permanent Link: New WordPress 3.0 Navigation Menus &#8211; What you need to know to get started'>New WordPress 3.0 Navigation Menus &#8211; What you need to know to get started</a> <small>One feature I&#039;m extremely excited to see in WordPress 3.0...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2010/07/20/wordcamp-utah-2010/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>New WordPress 3.0 Navigation Menus &#8211; What you need to know to get started</title>
		<link>http://www.scriptygoddess.com/archives/2010/06/23/new-wordpress-3-0-navigation-menus-what-you-need-to-know-to-get-started/</link>
		<comments>http://www.scriptygoddess.com/archives/2010/06/23/new-wordpress-3-0-navigation-menus-what-you-need-to-know-to-get-started/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 21:40:08 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress: Lessons Learned]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1640</guid>
		<description><![CDATA[One feature I&#039;m extremely excited to see in WordPress 3.0 is the new &#034;Menus&#034; feature. It&#039;s pretty easy to add and use in your theme. I was having trouble finding documentation on it, so this is not &#034;official&#034; but this is as far as I can tell, how you can go about using it. First, [...]


Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/09/10/anchor-links-in-wordpress-posts-another-shortcode-solution/' rel='bookmark' title='Permanent Link: Anchor Links in WordPress Posts &#8211; another shortcode solution'>Anchor Links in WordPress Posts &#8211; another shortcode solution</a> <small>I was recently asked by a client how they could...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/27/adding-a-block-of-html-to-a-wordpress-post/' rel='bookmark' title='Permanent Link: Adding a block of HTML to a WordPress post'>Adding a block of HTML to a WordPress post</a> <small>One problem with the WYSIWYG editor in WordPress is that...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/12/search-from-wordpress-admin-post-listing-redirecting-to-home-page/' rel='bookmark' title='Permanent Link: Search from WordPress Admin (Post Listing) Redirecting to Home Page'>Search from WordPress Admin (Post Listing) Redirecting to Home Page</a> <small>This is possibly the most bizarre thing I&#039;ve ever seen....</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>One feature I&#039;m extremely excited to see in WordPress 3.0 is the new &#034;Menus&#034; feature. It&#039;s pretty easy to add and use in your theme. I was having trouble finding documentation on it, so this is not &#034;official&#034; but this is as far as I can tell, how you can go about using it.</p>
<p>First, if your theme doesn&#039;t already have a functions.php file, go ahead and create one. Then add the following PHP code:</p>
<p><code>register_nav_menus( array(<br />
		'mainnav' => 'Main Nav'<br />
	) );</code></p>
<p>&#034;mainnav&#034; (which is the menu&#039;s &#034;slug&#034; and shown as &#034;Main Nav&#034; in the admin) is just what I came up with &#8211; but you can name it whatever you want, and you can have multiple nav menus if you want. Just register them all in that functions file. Here&#039;s an example with 3 nav menus:</p>
<p><code>register_nav_menus( array(<br />
		'mainnav' => 'Main Nav',<br />
		'navtwo' => 'Nav Bar Two',<br />
'navthree' => 'Nav Bar Three',<br />
	) );</code></p>
<p>That&#039;s it &#8211; What that does is tell your theme you&#039;re going to have three different/unique menus. You can use them as many times as you want, wherever you want in your theme.</p>
<p>You&#039;ll create your menus in the WordPress admin &#8211; this is pretty self explanatory (<a href="http://codex.wordpress.org/Appearance_Menus_SubPanel">and described pretty well here</a>) &#8211; add pages, categories, custom links that point outside your blog, whatever you want. Give the menu a name and &#034;apply&#034; it to a location:</p>
<p><img src="http://www.scriptygoddess.com/wp-content/uploads/2010/06/Screen-shot-2010-06-23-at-Jun-23-3.27.27-PM.png" alt="" title="Screen shot 2010-06-23 at Jun 23  3.27.27 PM" width="296" height="309" class="aligncenter size-full wp-image-1641" /></p>
<p>Now &#8211; to add it to your theme&#8230; You get a whole bunch of options so if you need the menu to display one way in one location, and a different way in another location &#8211; you can do that! </p>
<p>Here&#039;s a simple example where I&#039;ve stripped out the nav &#034;wrapper&#034; and any automatic styling it would add &#8211; just drop this in your theme file where you want the menu to show up (like your header.php, or footer.php&#8230; wherever)</p>
<p><code>$args =  array( 'menu' => 'mainnav', 'container' => false, 'menu_id' => false, 'menu_class' => false);<br />
wp_nav_menu($args);</code></p>
<p>But you can insert an ID or a class. <a href="http://codex.wordpress.org/Function_Reference/wp_nav_menu">This is detailed pretty well here.</a></p>
<p>I&#039;ve already started to use this and it&#039;s great. Clients have been really happy that they can now manage their own menus without requiring edits to a template.</p>
<p><strong>Updated to add:</strong> As pointed out by Stephen in the comments &#8211; if you are creating themes for general public use and you&#039;re not sure what version of WordPress your userbase will be running &#8211; you will want to wrap these new functions in a &#034;<em>if (function_exists(&#039;new-fancy-function-name-here&#039;)) { &#8230; }</em>&#034;. <a href="http://www.scratch99.com/2010/06/practical-theme-support-for-wordpress-3-0-menus/">He has details on this on his site here.</a> In there, he linked to another article that would have helped me out a lot had Google liked the page more so I could have found it when I was working on this recently &#8211; but there&#039;s some <a href="http://justintadlock.com/archives/2010/06/01/goodbye-headaches-hello-menus">additional reading here on how to set all this up</a> (it&#039;s a lot more in depth than I got into &#8211; I guess my version is the &#034;Cliff Notes&#034;) <img src='http://www.scriptygoddess.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>


<p>Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/09/10/anchor-links-in-wordpress-posts-another-shortcode-solution/' rel='bookmark' title='Permanent Link: Anchor Links in WordPress Posts &#8211; another shortcode solution'>Anchor Links in WordPress Posts &#8211; another shortcode solution</a> <small>I was recently asked by a client how they could...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/27/adding-a-block-of-html-to-a-wordpress-post/' rel='bookmark' title='Permanent Link: Adding a block of HTML to a WordPress post'>Adding a block of HTML to a WordPress post</a> <small>One problem with the WYSIWYG editor in WordPress is that...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/12/search-from-wordpress-admin-post-listing-redirecting-to-home-page/' rel='bookmark' title='Permanent Link: Search from WordPress Admin (Post Listing) Redirecting to Home Page'>Search from WordPress Admin (Post Listing) Redirecting to Home Page</a> <small>This is possibly the most bizarre thing I&#039;ve ever seen....</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2010/06/23/new-wordpress-3-0-navigation-menus-what-you-need-to-know-to-get-started/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Test Credit Card Numbers</title>
		<link>http://www.scriptygoddess.com/archives/2010/05/29/test-credit-card-numbers/</link>
		<comments>http://www.scriptygoddess.com/archives/2010/05/29/test-credit-card-numbers/#comments</comments>
		<pubDate>Sun, 30 May 2010 03:09:33 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[Lessons learned]]></category>
		<category><![CDATA[shopping cart]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1639</guid>
		<description><![CDATA[When you are working with an online store, sometimes you need to enter a credit card number that will pass the &#034;logic&#034; of how the card number should be structured so that you can test the flow of your site. These card numbers are not valid for purchase, and if validated against a gateway &#8211; [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>When you are working with an online store, sometimes you need to enter a credit card number that will pass the &#034;logic&#034; of how the card number should be structured so that you can test the flow of your site. These card numbers are not valid for purchase, and if validated against a gateway &#8211; it will return as being invalid &#8211; however, that&#039;s fine if all you&#039;re testing is the front end process of the store (before the gateway). In cleaning out my office today, I found a few numbers I used to use for this purpose. I can&#039;t remember if all of them worked (and the next time I have to run a test, I&#039;ll remove any I use that seem not to) &#8211; but wanted to keep these safer than in the dark corners of my office closet&#8230; </p>
<p>Visa:<br />
4444 3333 2222 1111</p>
<p>MasterCard:<br />
5424 0000000000 15<br />
(there&#039;s 10 zero&#039;s in there)</p>
<p>Discover:<br />
6011 0000000000 12<br />
(Again, 10 zero&#039;s)</p>
<p>Amex:<br />
37 000000000000 2<br />
(12 zero&#039;s in there)</p>
<p>There&#039;s also a bunch of other <a href="http://www.paypal.com/en_US/vhelp/paypalmanager_help/credit_card_numbers.htm">test credit card numbers here</a> in case you need them.</p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2010/05/29/test-credit-card-numbers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Blogger to WordPress move from hell!</title>
		<link>http://www.scriptygoddess.com/archives/2010/05/21/the-blogger-to-wordpress-move-from-hell/</link>
		<comments>http://www.scriptygoddess.com/archives/2010/05/21/the-blogger-to-wordpress-move-from-hell/#comments</comments>
		<pubDate>Sat, 22 May 2010 03:08:13 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress: Lessons Learned]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1638</guid>
		<description><![CDATA[One of the projects I&#039;ve been working on recently is to move a client&#039;s Blogger blog into WordPress. The blog is a few years old, but it has an ENORMOUS amount of comments. Doing the standard import from within WordPress wasn&#039;t bringing over all the posts and it barely scratched the surface of bringing over [...]


Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/09/12/search-from-wordpress-admin-post-listing-redirecting-to-home-page/' rel='bookmark' title='Permanent Link: Search from WordPress Admin (Post Listing) Redirecting to Home Page'>Search from WordPress Admin (Post Listing) Redirecting to Home Page</a> <small>This is possibly the most bizarre thing I&#039;ve ever seen....</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/27/adding-a-block-of-html-to-a-wordpress-post/' rel='bookmark' title='Permanent Link: Adding a block of HTML to a WordPress post'>Adding a block of HTML to a WordPress post</a> <small>One problem with the WYSIWYG editor in WordPress is that...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2010/03/14/custom-template-for-parent-and-sub-categories-without-a-plugin-in-wordpress/' rel='bookmark' title='Permanent Link: Custom Template for Parent and Sub Categories (without a plugin) in WordPress'>Custom Template for Parent and Sub Categories (without a plugin) in WordPress</a> <small>When using WordPress as a CMS, I often repurpose the...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>One of the projects I&#039;ve been working on recently is to move a client&#039;s Blogger blog into WordPress. The blog is a few years old, but it has an ENORMOUS amount of comments. Doing the standard import from within WordPress wasn&#039;t bringing over all the posts and it barely scratched the surface of bringing over the comments.</p>
<p>I found <a href="http://artlung.com/blog/2010/03/02/migrating-an-old-blogger-blog-to-wordpress/">this post on ArtLung: Migrating an old Blogger Blog To WordPress</a> &#8211; which was a HUGE help. The gist of that was you need to download an export file from Blogger, then <a href="http://code.google.com/p/google-blog-converters-appengine/downloads/list">get this script</a> you run from the terminal (on Mac) which will convert the Blogger xml into a xml that WordPress will understand. (Just to give you an idea what we&#039;re talking about &#8211; the Blogger XML file I downloaded was over 40MB.)</p>
<p>THEN the fun began. After the conversion to WordPress XML &#8211; the file was still about 30MB. This meant that I had to run the import over a dozen times before it could chew through the whole file. When the import times out and you run it again, it recognizes that some posts are already there, so it doesn&#039;t import them a second time &#8211; but for some reason, it seemed to have trouble with a bunch of comments. <em>Some</em> of the comments DID get imported more than once. As well &#8211; the comment counts for each post weren&#039;t getting updated. SO! Here&#039;s the fix I pieced together for those issues.</p>
<p>First, to remove the duplicate comments &#8211; in PHPMyAdmin &#8211; I ran the following SQL command: (*DISCLAIMER: make sure you backup your database before attempting any of this!!)</p>
<p><code>CREATE TABLE temp_table AS SELECT * FROM wp_comments WHERE 1 GROUP BY `comment_post_ID`,`comment_content`,`comment_date`;</code></p>
<p>What that does is create a duplicate of the wp_comments table &#8211; but it&#039;s only grabbing the unique entries. If a comment is posted to the same post, has the same content and the same date &#8211; we&#039;ll just be grabbing one of those and ignoring the rest.</p>
<p><strong>UPDATED TO ADD:</strong> One important thing I need to add in here is that you need to set the primary keys and a few indexes for this new table &#8211; This is the structure of a normal wp_comments table:</p>
<p><code>CREATE TABLE `wp_comments` (<br />
  `comment_ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT,<br />
  `comment_post_ID` bigint(20) unsigned NOT NULL DEFAULT '0',<br />
  `comment_author` tinytext NOT NULL,<br />
  `comment_author_email` varchar(100) NOT NULL DEFAULT '',<br />
  `comment_author_url` varchar(200) NOT NULL DEFAULT '',<br />
  `comment_author_IP` varchar(100) NOT NULL DEFAULT '',<br />
  `comment_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',<br />
  `comment_date_gmt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',<br />
  `comment_content` text NOT NULL,<br />
  `comment_karma` int(11) NOT NULL DEFAULT '0',<br />
  `comment_approved` varchar(20) NOT NULL DEFAULT '1',<br />
  `comment_agent` varchar(255) NOT NULL DEFAULT '',<br />
  `comment_type` varchar(20) NOT NULL DEFAULT '',<br />
  `comment_parent` bigint(20) unsigned NOT NULL DEFAULT '0',<br />
  `user_id` bigint(20) unsigned NOT NULL DEFAULT '0',<br />
  PRIMARY KEY (`comment_ID`),<br />
  KEY `comment_approved` (`comment_approved`),<br />
  KEY `comment_post_ID` (`comment_post_ID`),<br />
  KEY `comment_approved_date_gmt` (`comment_approved`,`comment_date_gmt`),<br />
  KEY `comment_date_gmt` (`comment_date_gmt`)<br />
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;</code></p>
<p>THEN, I ran this SQL command;</p>
<p><code>DROP TABLE wp_comments;<br />
RENAME TABLE temp_table TO wp_comments;</code></p>
<p>What that does is delete the wp_comments table, then we rename our new and improved &#034;temp_table&#034; so that it is now the official wp_comments table.</p>
<p>NEXT &#8211; we want to update the comment counts. To save having to recount the comments each time &#8211; there is a field in the wp_posts table that stores the total number of comments. However, with the way this import worked, those numbers did not get updated so most were saying there were 0 comments on posts that did have comments. To fix that issue I ran the following SQL command: (which I found <a href="http://planet.mysql.com/entry/?id=23970">here on Planet MySQL</a>)</p>
<p><code>UPDATE wp_posts wpp<br />
LEFT JOIN<br />
(SELECT comment_post_id AS c_post_id, count(*) AS cnt FROM wp_comments<br />
 WHERE comment_approved = 1 GROUP BY comment_post_id) wpc<br />
ON wpp.id=wpc.c_post_id<br />
SET wpp.comment_count=wpc.cnt<br />
WHERE wpp.post_type IN ('post', 'page')<br />
AND (wpp.comment_count!=wpc.cnt OR (wpp.comment_count != 0 AND wpc.cnt IS NULL));</code></p>
<p>Which as far as I can tell gets the comment counts for each post in wp_posts. (I can&#039;t tell you more than that because once you start getting into the &#034;LEFT JOIN&#034; stuff in sql, my brain shuts off)</p>
<p>The other piece advice I&#039;ll give is if you have a ginormous blog that you have to move like the one I was working with &#8211; set the blog up locally using <a href="http://www.mamp.info/en/index.html">MAMP</a>, do the imports, all the database correcting stuff &#8211; then just export the database and import it onto your server. The database file ended up only being 14MB uncompressed &#8211; way better than trying to chew through a 30MB import file. Once the database is up on your server, <a href="http://www.scriptygoddess.com/archives/2008/06/14/moving-a-wordpress-install/">a few more SQL commands (just like if you&#039;re moving your blog to a new domain)</a> to change the local version (probably http://localhost:8888 ) to your actual domain name, and you&#039;re done!</p>
<p><strong>Another tidbit to add:</strong> if you need to redirect blogger formatted url (that may include &#034;.html&#034; in the end) &#8211; add this to your htaccess file and it should redirect to the new (non extension ending) URL:</p>
<p><code>RewriteEngine On<br />
RewriteRule (.*)\.html $1 [R=301,L] </code></p>
<p>(I tooke off the first line and put the second line under the &#034;RewriteEngine On&#034; that WordPress has in it&#039;s htaccess block and it worked great)</p>


<p>Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/09/12/search-from-wordpress-admin-post-listing-redirecting-to-home-page/' rel='bookmark' title='Permanent Link: Search from WordPress Admin (Post Listing) Redirecting to Home Page'>Search from WordPress Admin (Post Listing) Redirecting to Home Page</a> <small>This is possibly the most bizarre thing I&#039;ve ever seen....</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/27/adding-a-block-of-html-to-a-wordpress-post/' rel='bookmark' title='Permanent Link: Adding a block of HTML to a WordPress post'>Adding a block of HTML to a WordPress post</a> <small>One problem with the WYSIWYG editor in WordPress is that...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2010/03/14/custom-template-for-parent-and-sub-categories-without-a-plugin-in-wordpress/' rel='bookmark' title='Permanent Link: Custom Template for Parent and Sub Categories (without a plugin) in WordPress'>Custom Template for Parent and Sub Categories (without a plugin) in WordPress</a> <small>When using WordPress as a CMS, I often repurpose the...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2010/05/21/the-blogger-to-wordpress-move-from-hell/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CSS for iPhone&#039;s eyes only (watch out for the cache)</title>
		<link>http://www.scriptygoddess.com/archives/2010/04/14/css-for-iphones-eyes-only-watch-out-for-the-cache/</link>
		<comments>http://www.scriptygoddess.com/archives/2010/04/14/css-for-iphones-eyes-only-watch-out-for-the-cache/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 04:21:07 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS related]]></category>
		<category><![CDATA[Lessons learned]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1636</guid>
		<description><![CDATA[On a project I was working on recently, I was pulling in some css for iPhone users using PHP with the following code: &#60;php if (strpos($_SERVER['HTTP_USER_AGENT'],"iPhone")) { ?&#62; ... CUSTOM CSS FOR IPHONE... &#60;php } ?&#62; This will also work for iPhones and iPod Touch: &#60;php if (strstr($_SERVER['HTTP_USER_AGENT'],'iPhone') &#124;&#124; strstr($_SERVER['HTTP_USER_AGENT'],'iPod')) { ?&#62; ... CUSTOM CSS... [...]


Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2010/03/16/seo-plugins-and-problems-with-the-titles-not-rewriting-wordpress/' rel='bookmark' title='Permanent Link: SEO Plugins and problems with the titles not rewriting (WordPress)'>SEO Plugins and problems with the titles not rewriting (WordPress)</a> <small>I can&#039;t speak for anyone else who has run into...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/10/anchor-links-in-wordpress-posts-another-shortcode-solution/' rel='bookmark' title='Permanent Link: Anchor Links in WordPress Posts &#8211; another shortcode solution'>Anchor Links in WordPress Posts &#8211; another shortcode solution</a> <small>I was recently asked by a client how they could...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>On a project I was working on recently, I was pulling in some css for iPhone users using PHP with the following code:</p>
<p><code>&lt;php if (strpos($_SERVER['HTTP_USER_AGENT'],"iPhone")) { ?&gt;<br />
... CUSTOM CSS FOR IPHONE...<br />
&lt;php } ?&gt;</code></p>
<p>This will also work for iPhones and iPod Touch:</p>
<p><code>&lt;php if (strstr($_SERVER['HTTP_USER_AGENT'],'iPhone') || strstr($_SERVER['HTTP_USER_AGENT'],'iPod')) { ?&gt;<br />
... CUSTOM CSS...<br />
&lt;php } ?&gt;</code></p>
<p>That&#039;s great and all &#8211; but then suddenly one day it stopped working. Going back through what changed on the site, I realized one thing we added was a cache plugin. DOH! So the page gets cached without the custom CSS for the iPhone &#8211; the iPhone calls up the site but gets served the cached page (non-iPhone version)&#8230; Yeah, that would do it.</p>
<p>So I found <a href="http://www.boutell.com/newfaq/creating/iphone.html">this solution</a>:</p>
<p><code>&lt;!--[if !IE]&gt;--&gt;<br />
    &lt;style type="text/css"&gt;<br />
	@media only screen and (max-device-width: 480px) {<br />
.... CUSTOM CSS HERE....<br />
	}<br />
	&lt;/style&gt;<br />
&lt;!--&lt;![endif]--&gt;</code></p>
<p>or of course you can pull in a whole stylesheet for the iphone:</p>
<p><code>&lt;!--[if !IE]&gt;--&gt;<br />
&lt;link media="only screen and (max-device-width: 480px)"  rel="stylesheet" type="text/css" href="iphone.css" /&gt;<br />
&lt;!--&lt;![endif]--&gt;</code></p>


<p>Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2010/03/16/seo-plugins-and-problems-with-the-titles-not-rewriting-wordpress/' rel='bookmark' title='Permanent Link: SEO Plugins and problems with the titles not rewriting (WordPress)'>SEO Plugins and problems with the titles not rewriting (WordPress)</a> <small>I can&#039;t speak for anyone else who has run into...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/10/anchor-links-in-wordpress-posts-another-shortcode-solution/' rel='bookmark' title='Permanent Link: Anchor Links in WordPress Posts &#8211; another shortcode solution'>Anchor Links in WordPress Posts &#8211; another shortcode solution</a> <small>I was recently asked by a client how they could...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2010/04/14/css-for-iphones-eyes-only-watch-out-for-the-cache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Really awesome membership plugin for WordPress</title>
		<link>http://www.scriptygoddess.com/archives/2010/04/07/really-awesome-membership-plugin-for-wordpress/</link>
		<comments>http://www.scriptygoddess.com/archives/2010/04/07/really-awesome-membership-plugin-for-wordpress/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 14:37:53 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[WordPress Plugins]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1635</guid>
		<description><![CDATA[A project I was working on recently required the use of a membership plugin. I had done some research on membership plugins awhile back and remembered only finding ones that were pretty pricey. One last ditch effort searching through the plugin repository on WordPress.org &#8211; I found one that I hadn&#039;t remembered seeing before: S2Member. [...]


Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/10/07/delink-pages-plugin/' rel='bookmark' title='Permanent Link: Delink Pages Plugin'>Delink Pages Plugin</a> <small>(Plugin and this post last updated: 10/20/2009 &#8211; Latest Plugin...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2010/03/14/custom-template-for-parent-and-sub-categories-without-a-plugin-in-wordpress/' rel='bookmark' title='Permanent Link: Custom Template for Parent and Sub Categories (without a plugin) in WordPress'>Custom Template for Parent and Sub Categories (without a plugin) in WordPress</a> <small>When using WordPress as a CMS, I often repurpose the...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/10/30/multiple-featured-content-galleries/' rel='bookmark' title='Permanent Link: Multiple Featured Content Galleries'>Multiple Featured Content Galleries</a> <small>On a site I was working on recently, the client...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>A project I was working on recently required the use of a membership plugin. I had done some research on membership plugins awhile back and remembered only finding ones that were pretty pricey. One last ditch effort searching through the plugin repository on WordPress.org &#8211; I found one that I hadn&#039;t remembered seeing before: <a href="http://www.primothemes.com/post/s2member-membership-plugin-with-paypal/">S2Member</a>. This plugin really is packed with features and gives the others a run for their money. If you are in the market for a membership plugin &#8211; definitely give this one a try first. (And if you&#039;re happy with it, make sure you contribute to it&#039;s development. If we all chip in, we all benefit!) (<a href="http://wordpress.org/extend/plugins/s2member/">Here&#039;s the download page on wordpress.org</a>)</p>
<p>Here&#039;s the plugin description taken from the download page:</p>
<p><em>s2Member is a full-featured membership management system for WordPress®. It provides a very tight integration with PayPal® Subscriptions, and fully supports recurring billing with the ability to track affiliate commissions on a recurring basis. s2Member supports up to 4 different levels of membership with custom labels. It supports custom Pages for signup, account access, and many others. It also supports the ability to protect certain Pages, certain Posts, certain Categories/Tags, certain parts of content, and even includes advanced documentation on how to utilize the PHP runtime constants provided by the s2Member API. s2Member also supports protected file downloads with limitations on the how many files each user ( or each level ) can download in a given period of time.</em></p>


<p>Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/10/07/delink-pages-plugin/' rel='bookmark' title='Permanent Link: Delink Pages Plugin'>Delink Pages Plugin</a> <small>(Plugin and this post last updated: 10/20/2009 &#8211; Latest Plugin...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2010/03/14/custom-template-for-parent-and-sub-categories-without-a-plugin-in-wordpress/' rel='bookmark' title='Permanent Link: Custom Template for Parent and Sub Categories (without a plugin) in WordPress'>Custom Template for Parent and Sub Categories (without a plugin) in WordPress</a> <small>When using WordPress as a CMS, I often repurpose the...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/10/30/multiple-featured-content-galleries/' rel='bookmark' title='Permanent Link: Multiple Featured Content Galleries'>Multiple Featured Content Galleries</a> <small>On a site I was working on recently, the client...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2010/04/07/really-awesome-membership-plugin-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Showing multiple random quotes</title>
		<link>http://www.scriptygoddess.com/archives/2010/04/01/showing-multiple-random-quotes/</link>
		<comments>http://www.scriptygoddess.com/archives/2010/04/01/showing-multiple-random-quotes/#comments</comments>
		<pubDate>Fri, 02 Apr 2010 05:03:39 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Script snippet]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1629</guid>
		<description><![CDATA[Showing random quotes isn&#039;t anything new. When I needed to do something similar on a site recently, there were plenty of pre-written scripts to choose from. The trick however, was that I wanted to show more than one quote at a time (and of course I didn&#039;t want to show the same quote twice. That [...]


Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/10/30/multiple-featured-content-galleries/' rel='bookmark' title='Permanent Link: Multiple Featured Content Galleries'>Multiple Featured Content Galleries</a> <small>On a site I was working on recently, the client...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Showing random quotes isn&#039;t anything new. When I needed to do something similar on a site recently, there were plenty of pre-written scripts to choose from. The trick however, was that I wanted to show more than one quote at a time (and of course I didn&#039;t want to show the same quote twice. That wasn&#039;t as easy to find.  (I&#039;m sure there&#039;s variations out there, but now I&#039;ll always have a place to find mine) <img src='http://www.scriptygoddess.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>First step is to load all the quotes you want into an array:</p>
<p><code>$quotes[] = "This is line 1";<br />
$quotes[] = "This is line 2";<br />
$quotes[] = "this is line 3";<br />
$quotes[] = "This is another line";<br />
$quotes[] = "This is yet another line";<br />
$quotes[] = "Line 6";</code></p>
<p>Now get a handful of keys using <a href="http://php.net/manual/en/function.array-rand.php">array_rand</a>:</p>
<p><code>$rand_keys = array_rand($quotes, 2);</code></p>
<p>We specified to get two random keys from the $quotes array &#8211; (You can grab more if you want, just change the &#034;2&#034;)</p>
<p>Now that we have our random keys &#8211; you can either list them out one by one like this:</p>
<p><code>//show the first quote...<br />
echo $quotes[$rand_keys[0]];<br />
//show the second quote<br />
echo $quotes[$rand_keys[1]];</code></p>
<p>Or you can loop through the keys like this:</p>
<p><code>foreach ($rand_keys as $value) {<br />
	echo $quotes[$value]."&lt;br /&gt;";<br />
}</code></p>
<p>That&#039;s all there is to it.</p>


<p>Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/10/30/multiple-featured-content-galleries/' rel='bookmark' title='Permanent Link: Multiple Featured Content Galleries'>Multiple Featured Content Galleries</a> <small>On a site I was working on recently, the client...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2010/04/01/showing-multiple-random-quotes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SEO Plugins and problems with the titles not rewriting (WordPress)</title>
		<link>http://www.scriptygoddess.com/archives/2010/03/16/seo-plugins-and-problems-with-the-titles-not-rewriting-wordpress/</link>
		<comments>http://www.scriptygoddess.com/archives/2010/03/16/seo-plugins-and-problems-with-the-titles-not-rewriting-wordpress/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 17:20:22 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Hacks]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1633</guid>
		<description><![CDATA[I can&#039;t speak for anyone else who has run into this problem, but I know I have run into it on more than one occasion. Having just figured out my particular issue this time, I&#039;m making a note for myself (and anyone else who may have the same problem). You may run into this problem [...]


Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2010/03/14/custom-template-for-parent-and-sub-categories-without-a-plugin-in-wordpress/' rel='bookmark' title='Permanent Link: Custom Template for Parent and Sub Categories (without a plugin) in WordPress'>Custom Template for Parent and Sub Categories (without a plugin) in WordPress</a> <small>When using WordPress as a CMS, I often repurpose the...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/27/adding-a-block-of-html-to-a-wordpress-post/' rel='bookmark' title='Permanent Link: Adding a block of HTML to a WordPress post'>Adding a block of HTML to a WordPress post</a> <small>One problem with the WYSIWYG editor in WordPress is that...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/10/anchor-links-in-wordpress-posts-another-shortcode-solution/' rel='bookmark' title='Permanent Link: Anchor Links in WordPress Posts &#8211; another shortcode solution'>Anchor Links in WordPress Posts &#8211; another shortcode solution</a> <small>I was recently asked by a client how they could...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>I can&#039;t speak for anyone else who has run into this problem, but I know I have run into it on more than one occasion. Having just figured out my particular issue this time, I&#039;m making a note for myself (and anyone else who may have the same problem).</p>
<p>You may run into this problem if you have a template that you have &#034;hardcoded&#034; the header (in my case &#8211; it was a custom page template that actually needed a completely different header than the rest of the site &#8211; so I opted not to use &#034;get_header()&#034; on this template and just put the custom header right there in my custom page template&#8230;)</p>
<p>I *did* remember to include the &#034;wp_head()&#034; &#8211; so that wasn&#039;t the issue (although I have fogotten to do that on other occasions and that will cause all kinds of trouble, including seo plugin stuff not working) &#8211; but in this case &#8211; the other meta tags were coming in &#8211; but the titles weren&#039;t being rewritten.</p>
<p>The problem was the fact that I wasn&#039;t using get_header() &#8211; this must be the function that kicks off the search for that title tag and replaces it with the rewritten titles. <strong>If you don&#039;t use get_header() &#8211; your titles will not be rewritten.</strong></p>
<p><em>You will run into the same problem even if you don&#039;t &#034;hardcode&#034; your header &#8211; and use the &#034;include&#034; line instead: </em></p>
<p><code>include( TEMPLATEPATH . '/header2.php' );</code></p>
<p>Whatever happens with &#034;get_header()&#034; &#8211; you need to run it to get those titles working.</p>
<p>(<strong>I&#039;ve since updated this post &#8211; scroll down to the bottom for the simplest solution!!</strong>)<br />
So if you have a different header for your page template &#8211; what you need to do is <strong>within your header.php</strong> &#8211; determine which header file it should load in&#8230; but ONLY AFTER you have the title tags written out&#8230; You could even use the &#034;is_page_template()&#034; function to figure out which header to pull in.</p>
<p>So my header.php looked something like this for this project I was running into with this:</p>
<p><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;<br />
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;<br />
&lt;title&gt;&lt;?php wp_title('&laquo;', true, 'right'); ?&gt; &lt;?php bloginfo('name'); ?&gt;&lt;/title&gt;<br />
&lt;?php<br />
if (is_page_template('my-custom-page-template1.php')  || is_page_template('my-custom-page-template2.php')) {<br />
include( TEMPLATEPATH . '/my-custom-page-template-header.php' );<br />
} else {<br />
?&gt;<br />
... rest of the header is here...<br />
&lt;?php } // endif custom page template checking... ?&gt;</code></p>
<p>Now you can put your custom header in that &#034;my-custom-page-template-header.php&#034; (or whatever you want to call it) and on your &#034;my-custom-page-template1.php and my-custom-page-template2.php, etc just use get_header() at the top like normal.</p>
<p><strong>Actually &#8211; here&#039;s an even better/simpler option:</strong></p>
<p>Name your custom header like this:<br />
<strong>header-<em>my-customheader</em>.php</strong>.</p>
<p>Then when you call &#034;get_header()&#034; &#8211; do so like this:</p>
<p><code>get_header('my-customheader');</code></p>


<p>Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2010/03/14/custom-template-for-parent-and-sub-categories-without-a-plugin-in-wordpress/' rel='bookmark' title='Permanent Link: Custom Template for Parent and Sub Categories (without a plugin) in WordPress'>Custom Template for Parent and Sub Categories (without a plugin) in WordPress</a> <small>When using WordPress as a CMS, I often repurpose the...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/27/adding-a-block-of-html-to-a-wordpress-post/' rel='bookmark' title='Permanent Link: Adding a block of HTML to a WordPress post'>Adding a block of HTML to a WordPress post</a> <small>One problem with the WYSIWYG editor in WordPress is that...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/10/anchor-links-in-wordpress-posts-another-shortcode-solution/' rel='bookmark' title='Permanent Link: Anchor Links in WordPress Posts &#8211; another shortcode solution'>Anchor Links in WordPress Posts &#8211; another shortcode solution</a> <small>I was recently asked by a client how they could...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2010/03/16/seo-plugins-and-problems-with-the-titles-not-rewriting-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Custom Template for Parent and Sub Categories (without a plugin) in WordPress</title>
		<link>http://www.scriptygoddess.com/archives/2010/03/14/custom-template-for-parent-and-sub-categories-without-a-plugin-in-wordpress/</link>
		<comments>http://www.scriptygoddess.com/archives/2010/03/14/custom-template-for-parent-and-sub-categories-without-a-plugin-in-wordpress/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 06:26:11 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Hacks]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1632</guid>
		<description><![CDATA[When using WordPress as a CMS, I often repurpose the &#034;posts&#034; as other types of content a site may need. For example, news or press releases, or any information that might need the ability to be catgorized and/or tagged (like testimonials). However, this may mean that you need a completely different template for your news [...]


Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/10/30/multiple-featured-content-galleries/' rel='bookmark' title='Permanent Link: Multiple Featured Content Galleries'>Multiple Featured Content Galleries</a> <small>On a site I was working on recently, the client...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2010/03/16/seo-plugins-and-problems-with-the-titles-not-rewriting-wordpress/' rel='bookmark' title='Permanent Link: SEO Plugins and problems with the titles not rewriting (WordPress)'>SEO Plugins and problems with the titles not rewriting (WordPress)</a> <small>I can&#039;t speak for anyone else who has run into...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/10/anchor-links-in-wordpress-posts-another-shortcode-solution/' rel='bookmark' title='Permanent Link: Anchor Links in WordPress Posts &#8211; another shortcode solution'>Anchor Links in WordPress Posts &#8211; another shortcode solution</a> <small>I was recently asked by a client how they could...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>When using WordPress as a CMS, I often repurpose the &#034;posts&#034; as other types of content a site may need. For example, news or press releases, or any information that might need the ability to be catgorized and/or tagged (like testimonials). However, this may mean that you need a completely different template for your news page than you would want for your testimonials page.</p>
<p>WordPress gives you the <a href="http://codex.wordpress.org/Theme_Development">ability</a> to create <a href="http://codex.wordpress.org/Category_Templates">category specific templates</a>. So let&#039;s say your &#034;news&#034; category has an ID of 5 &#8211; if you create a category.php page to be used by all the other categories, and also created a category-5.php page &#8211; then just your news page will use that template for the category archive page.</p>
<p>But &#8211; what if you have a huge handful of subcategories and you want them all to use the same category template as it&#039;s parent? (Let&#039;s also assume that we can&#039;t just make this the default template) Here&#039;s what I came up with. Let&#039;s say that Testimonials is our category &#8211; it has an id of 12. It also has a dozen or so subcategories (for argument&#039;s sake, lets say we&#039;ve sorted our testimonials into groups from what types of companies these testimoinals have come from &#034;Consulting Firms&#034;, &#034;Web Host Providers&#034;, &#034;Design Firms&#034;, etc.</p>
<p>We don&#039;t want to duplicate our category template for every subcategory we have. That&#039;s a nightmare to manage. So lets do this instead: In your category.php template file &#8211; before ANYTHING ELSE &#8211; even before you call get_header() &#8211; we add the following:</p>
<p><code>$thecategory = get_category($cat);<br />
if ($thecategory-&gt;category_parent == '12' || $thecategory-&gt;cat_ID == '12') {<br />
include(TEMPLATEPATH.'/testimonials-template.php');<br />
} else {<br />
/* include... default template file here like we included the "testimonials-template.php - or you can just wrap this around your actual template code... */<br />
}</code></p>
<p>So what this does is it gets information about the category &#8211; if the current category&#039;s PARENT is 12 OR we are in fact looking at category 12 &#8211; then we pull in that special testimonials-template.php file&#8230; Otherwise the other code would be executed. (In the file I was using I just wrapped that around my existing category.php template code&#8230;</p>
<p><strong>Please note:</strong> I have not tested this on if you have a SUB SUB category &#8211; I&#039;m thinking $thecategory-&gt;category_parent probably only looks one level above the current category&#8230; so keep that in mind.</p>
<p>(I make the note above that this does not include a plugin because when I was trying to get this to work &#8211; one solution I had found online involved installing a plugin that kind of messed with my category heirarchy in a way I wasn&#039;t crazy about. Personally, I think this is a much simpler solution)</p>


<p>Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/10/30/multiple-featured-content-galleries/' rel='bookmark' title='Permanent Link: Multiple Featured Content Galleries'>Multiple Featured Content Galleries</a> <small>On a site I was working on recently, the client...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2010/03/16/seo-plugins-and-problems-with-the-titles-not-rewriting-wordpress/' rel='bookmark' title='Permanent Link: SEO Plugins and problems with the titles not rewriting (WordPress)'>SEO Plugins and problems with the titles not rewriting (WordPress)</a> <small>I can&#039;t speak for anyone else who has run into...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2009/09/10/anchor-links-in-wordpress-posts-another-shortcode-solution/' rel='bookmark' title='Permanent Link: Anchor Links in WordPress Posts &#8211; another shortcode solution'>Anchor Links in WordPress Posts &#8211; another shortcode solution</a> <small>I was recently asked by a client how they could...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2010/03/14/custom-template-for-parent-and-sub-categories-without-a-plugin-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Never Update the Copyright Year Again (on a PHP page)</title>
		<link>http://www.scriptygoddess.com/archives/2010/01/13/never-update-the-copyright-year-again-on-a-php-page/</link>
		<comments>http://www.scriptygoddess.com/archives/2010/01/13/never-update-the-copyright-year-again-on-a-php-page/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 17:57:55 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1628</guid>
		<description><![CDATA[This is a really silly little trick &#8211; but if you have a PHP page that has a &#169; copyright year at the bottom &#8211; there is no reason you should be updating that every year (unless it&#039;s just something you overlooked initially) As you get requests from clients now that we&#039;re in a new [...]


Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/10/27/striping-img-tags-from-the_content-in-wordpress-and-how-to-fudge-page-excerpts/' rel='bookmark' title='Permanent Link: Striping IMG tags from the_content in WordPress (and how to fudge page excerpts)'>Striping IMG tags from the_content in WordPress (and how to fudge page excerpts)</a> <small>Background: For a site I was working on, I was...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2010/04/01/showing-multiple-random-quotes/' rel='bookmark' title='Permanent Link: Showing multiple random quotes'>Showing multiple random quotes</a> <small>Showing random quotes isn&#039;t anything new. When I needed to...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>This is a really silly little trick &#8211; but if you have a PHP page that has a &copy; copyright year at the bottom &#8211; there is no reason you should be updating that every year (unless it&#039;s just something you overlooked initially) <img src='http://www.scriptygoddess.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  As you get requests from clients now that we&#039;re in a new year to change the copyright year in the footer &#8211; do yourself a favor and use this instead so you never have to do it again. <img src='http://www.scriptygoddess.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><code>&lt;?php echo date("Y"); ?&gt;</code></p>


<p>Related posts:<ol><li><a href='http://www.scriptygoddess.com/archives/2009/10/27/striping-img-tags-from-the_content-in-wordpress-and-how-to-fudge-page-excerpts/' rel='bookmark' title='Permanent Link: Striping IMG tags from the_content in WordPress (and how to fudge page excerpts)'>Striping IMG tags from the_content in WordPress (and how to fudge page excerpts)</a> <small>Background: For a site I was working on, I was...</small></li>
<li><a href='http://www.scriptygoddess.com/archives/2010/04/01/showing-multiple-random-quotes/' rel='bookmark' title='Permanent Link: Showing multiple random quotes'>Showing multiple random quotes</a> <small>Showing random quotes isn&#039;t anything new. When I needed to...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2010/01/13/never-update-the-copyright-year-again-on-a-php-page/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 3.197 seconds -->
<!-- Cached page served by WP-Cache -->
