<?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>That PHP Girl &#187; DIY</title>
	<atom:link href="http://thatphpgirl.com/cat/blog/diy/feed/" rel="self" type="application/rss+xml" />
	<link>http://thatphpgirl.com</link>
	<description>PHP, WordPress, and Theme Development</description>
	<lastBuildDate>Mon, 15 Mar 2010 13:57:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Thank You, Wordpress!</title>
		<link>http://thatphpgirl.com/thank-you-wordpress/</link>
		<comments>http://thatphpgirl.com/thank-you-wordpress/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 13:57:07 +0000</pubDate>
		<dc:creator>Nikole</dc:creator>
				<category><![CDATA[DIY]]></category>

		<guid isPermaLink="false">http://thatphpgirl.com/?p=493</guid>
		<description><![CDATA[<p>I'll tell you why spending $7-12k for a content management system (CMS) for your website is a thing of the past, and what other cost-effective shortcuts you can take to build your site for less.</p>]]></description>
			<content:encoded><![CDATA[<p>I happened to come upon a post this morning entitled <a href="http://www.atilus.com/webpost/what_does_a_website_cost/">What does a website cost?</a>. I can only imagine it was written a while back, before Wordpress came along with its current functionality and use. $7,000-$12,000 for a content management system? That price would be outrageous by today&#8217;s standards. Just as hardware technology gets better and cheaper, so should programming technology. Why? Well, because &#8230;</p>
<ul>
<li><strong>The tools already exist.</strong> Plugins, APIs, 3rd party services &mdash; all of these make creating your site faster and less expensive. Many of these services are so good now that there is just no logical reason to build your own. For example, Flickr is an awesome tool for uploading and organizing photos, and it has tons of search engine weight, so why would you build your own photo gallery when you can use a Flickr Pro account and their API to display images on your site? Another example is Paypal and Google Checkout. Many small businesses have no need for a full-blown e-commerce solution, as they only have a few products, low inventory, low sales volume, or they track sales themselves. For those people, having a merchant account with gateway fees is just throwing away money when they could do just as well with a site that uses Buy Now buttons (at a fraction of the development cost).</li>
<li><strong>The code library is already available.</strong> A few years back, everything had to be hand-coded from scratch. Now it is not unusual to find code repositories of PHP, JavaScript, CSS and HTML.  I know that I have my own library of common functions from past clients that I can use on future projects, decreasing their development time as well.</li>
<li><strong>Themes are better than ever.</strong> Five years ago, a custom site would have meant hiring a developer and hand-coding the entire thing from scratch. Now that Wordpress is widely used and theme developers offer framework and layout options, customizing simply means rebranding a layout with some module changes &mdash; which slashes the website development time and costs. Many businesses can use the same layout without the end-user ever catching on, thanks to customization of the theme. (If you want an example of that, see how <a href="http://showcase.woothemes.com/category/fresh-news/" target"_new">one theme is used very differently by over 100 sites</a> at the WooThemes Showcase.</li>
<li><strong>Stock imagery sites offer a wide array of choices.</strong> By combining stock imagery elements in new ways, you can create unique graphical looks for less. Even if another site is using one of your same elements, the overall effect will be very different because it is the combination of the elements (along with the developed functionality) that creates the overall look and feel.</li>
</ul>
<p>Now I am sure some developers out there will hand-code you a small brochure site for $1-5k, but why go that route when there are so many more options available? I know that I have dropped my prices in the past five years as technology and processes have improved, as it is only fair to my customers to pass those advancements on to them.</p>
<p><em>Nikole Gipps is a PHP/CSS/HTML web developer who takes pride in using out-of-the-box thinking to find unique solutions for the small businesses and entrepreneurs she serves. Catch more of her posts at <a href="http://thatphpgirl.com">That PHP Girl</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://thatphpgirl.com/thank-you-wordpress/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Attaching a Signature to Blog Content</title>
		<link>http://thatphpgirl.com/attaching-a-signature-to-blog-content/</link>
		<comments>http://thatphpgirl.com/attaching-a-signature-to-blog-content/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 17:22:30 +0000</pubDate>
		<dc:creator>Nikole</dc:creator>
				<category><![CDATA[DIY]]></category>
		<category><![CDATA[blog development]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[custom template]]></category>
		<category><![CDATA[feed]]></category>
		<category><![CDATA[internet marketing]]></category>
		<category><![CDATA[marketing]]></category>
		<category><![CDATA[social media]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[website]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://thatphpgirl.com/?p=485</guid>
		<description><![CDATA[Traditionally, blog posts have some sort of signature or about function built into the template that displays a snippet about the author somewhere in the post or sidebar. I recently reconsidered this functionality after reading the post Is Google Stealing Authors’ Copyright With Buzz?, because building a signature into the template works well for easily [...]]]></description>
			<content:encoded><![CDATA[<p>Traditionally, blog posts have some sort of signature or about function built into the template that displays a snippet about the author somewhere in the post or sidebar. I recently reconsidered this functionality after reading the post <a href="http://staynalive.com/articles/2010/02/25/is-google-stealing-authors-copyright-with-buzz/">Is Google Stealing Authors’ Copyright With Buzz?</a>, because building a signature into the template works well for easily changing the signature when needed or making default signatures for each author but it means the signature doesn&#8217;t go with the content. With the web becoming more mobile and being read less on the original site, it makes sense to make sure the purpose goes with content.</p>
<p>To that end, I&#8217;m going to try attaching a signature to all my posts here. I already tried it out with my <a href="http://oregontreehugger.com/building-the-strawberry-beds/" target="_new">latest post over at Oregon Treehugger</a>, and I am happy with the signature itself. As this content-based closing could live on in Google caches indefinitely, I think it&#8217;s important to put a lot of thought about it and figure out what to say. Some important points to remember:</p>
<ul>
<li><strong>Focus on what is most important.</strong> If you only have a few seconds to get across what is most important about you, make sure you are not rambling! Think of this in terms of your 7-second commercial &mdash; give us your unique selling proposition and get people interested in finding out more.</li>
<li><strong>Use three links or less.</strong> I went to a networking event last year and I was surprised at how many people were trying to tell people about many of their businesses/projects at the same time. If you want to lose your audience, link everything in your signature to all your various project. If you want to keep your focus, link one or two things so your readers have a clear direction to learn more.</li>
<li><strong>Tailor the closing to the content, or use them all for the same goal.</strong> If you are like other entrepreneurs, you probably have multiple pots on the stove right now. This leaves you with two choices &mdash; either tailor the closing to the content it is attached to, or use the closing of all your content to steer people toward the same end goal. For example, I write for a lot of sites but my main goal is always to increase business for myself here at That PHP Girl, and my current signature reflects that.</li>
<li><strong>Use simple formatting.</strong> As your CSS doesn&#8217;t always go with your content, use simple formatting for your signature, such as using italics and the small tag.</li>
<li><strong>Sell &mdash; or don&#8217;t.</strong> If you want your signature to be a commercial for your business, use it that way! Pitch a service like &quot;Learn how you can double your income in just 6 months &#8230;&quot; or &quot;Get your free consultation today at &#8230;&quot; If you would rather make it more of an about text, such as &quot;Judy is a marathon runner and elementary school PE teacher in Fitchburg, MA&#8230;&quot;, that is fine as well. There are no set rules for every business. Just be careful about putting anything temporary, such as a monthly special, as the content signature could outlive the advertised special by far.</li>
</ul>
<p><em>Nikole Gipps is a detail-oriented web developer, mud-loving Cornell Aggie, avid gardener, occasional iron chef, patient wife and fun mom of two. You can follow her work at <a href="http://thatphpgirl.com">That PHP Girl</a> or see all of her feeds at <a href="http://www.nikolegipps.com/">NikoleGipps.com</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://thatphpgirl.com/attaching-a-signature-to-blog-content/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>10 Useful Twitter Plugins for Wordpress that Work!</title>
		<link>http://thatphpgirl.com/10-useful-twitter-plugins-for-wordpress-that-work/</link>
		<comments>http://thatphpgirl.com/10-useful-twitter-plugins-for-wordpress-that-work/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 21:26:24 +0000</pubDate>
		<dc:creator>Nikole</dc:creator>
				<category><![CDATA[DIY]]></category>
		<category><![CDATA[blog development]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[social media]]></category>
		<category><![CDATA[theme customization]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[website]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://thatphpgirl.com/?p=460</guid>
		<description><![CDATA[It seems like there are a million Twitter plugins and widgets for Wordpress, but many are outdated, no longer updated, don&#8217;t work in Wordpress 2.9.x, or are just plain useless. To help you separate the wheat from the chaff, I&#8217;ve compiled this list of ten useful plugins and widget to get your Twitter account playing [...]]]></description>
			<content:encoded><![CDATA[<p>It seems like there are a million Twitter plugins and widgets for Wordpress, but many are outdated, no longer updated, don&#8217;t work in Wordpress 2.9.x, or are just plain useless. To help you separate the wheat from the chaff, I&#8217;ve compiled this list of ten useful plugins and widget to get your Twitter account playing nicely with your WordPress blog.</p>
<ul>
<li><strong><a href="http://rick.jinlabs.com/code/twitter/" target="_new">Twitter for Wordpress</a></strong><br />
This plugin can be coded into your theme or used as a widget. It is a very simple plugin that offers customizable CSS for styling.<br />
<img src="http://thatphpgirl.com/wp-content/uploads/2010/03/Picture-54.png" alt="Twitter for Wordpress Plugin" title="Twitter for Wordpress Plugin" width="488" height="142" class="centered size-full wp-image-466" /></li>
<li><strong><a href="" target="_new">TweetMeme</a></strong><br />
TweetMeme easily allows your blog post or page to be retweeted. It provides a live count of how many times your post/page has been retweeted throughout Twitter, and is a very popular plugin for large brands like TechCrunch and Mashable. The tweets are tracked at TweetMeme.com.<br />
<img src="http://thatphpgirl.com/wp-content/uploads/2010/03/Picture-64.png" alt="TweetMeme Twitter Wordpress Plugin" title="TweetMeme Twitter Wordpress Plugin" width="71" height="78" class="centered size-full wp-image-471" /></li>
<li><strong><a href="http://www.enthropia.com/labs/wp-lifestream/" target="_new">Lifestream for Wordpress</a></strong><br />
Obviously this plugin does a lot more than a twitter feed, but it offers several key advanced features like the use of custom themes for feed display.<br />
<img src="http://thatphpgirl.com/wp-content/uploads/2010/03/Picture-56.png" alt="Lifestream for Wordpress Twitter Plugin" title="Lifestream for Wordpress Twitter Plugin" width="217" height="189" class="centered size-full wp-image-467" /></li>
<li><strong><a href="http://tweetburn.com/tools/" target="_new">Tweetroll / Tweeple</a></strong><br />
These tools give you customizable widgets to show your recent tweets, list your followers, and other stats. There is also an option to monetize your tweets.<br />
<img src="http://thatphpgirl.com/wp-content/uploads/2010/03/Picture-59.png" alt="Tweeple Twitter Wordpress Plugin" title="Tweeple Twitter Wordpress Plugin" width="165" height="469" class="centered size-full wp-image-478" /></li>
<li><strong><a href="http://danzarrella.com/beyond-tweetbacks-introducing-tweetsuite.html" target="_new">TweetSuite</a></strong><br />
TweetSuite offers a whole host of features like tweet tracking, most tweeted, and retweets.<br />
<img src="http://thatphpgirl.com/wp-content/uploads/2010/03/Picture-53.png" alt="TweetSuite Twitter Wordpress Plugin" title="TweetSuite Twitter Wordpress Plugin" width="169" height="187" class="centered size-full wp-image-463" /></li>
<li><strong><a href="http://xavisys.com/wordpress-plugins/wordpress-twitter-widget/" target="_new">Twitter Widget Pro</a></strong><br />
Twitter Widget Pro properly handles and displays your Twitter feed in your blog&#8217;s sidebar.<br />
<img src="http://thatphpgirl.com/wp-content/uploads/2010/03/Picture-62.png" alt="Twitter Widget Pro Twitter Wordpress Plugin" title="Twitter Widget Pro Twitter Wordpress Plugin" width="282" height="268" class="centered size-full wp-image-473" /></li>
<li><strong><a href="http://www.improvingtheweb.com/wordpress-plugins/tweet-stats/" target="_new">Tweet Stats</a></strong><br />
Tweet Stats utilizes the TweetBacks plugin (above) to display &quot;Most Tweeted&quot; and &quot;Recently Tweeted&quot; widgets on your blog.<br />
<img src="http://thatphpgirl.com/wp-content/uploads/2010/03/Picture-52.png" alt="Tweet Stats Twitter Wordpress Plugin" title="Tweet Stats Twitter Wordpress Plugin" width="451" height="216" class="centered size-full wp-image-461" /></li>
<li><strong><a href="http://richardxthripp.thripp.com/tweet-this" target="_new">Tweet This</a></strong><br />
Tweet This adds &quot;Tweet This&quot; icons to your posts, shortens the post URLs, and automatically tweets new posts. <em>Note: This plugin may or may not work in Wordpress 2.9 &mdash; there have been mixed reviews on using it with the latest WordPress release. I&#8217;ve gotten it to work, but your mileage may vary.</em><br />
<img src="http://thatphpgirl.com/wp-content/uploads/2010/03/Picture-58.png" alt="Tweet This Twitter Wordpress Plugin" title="Tweet This Twitter Wordpress Plugin" width="420" height="39" class="centered size-full wp-image-479" /></li>
<li><strong><a href="http://www.webmaster-source.com/tweetable-twitter-plugin-wordpress/" target="_new">Tweetable</a></strong><br />
Tweetable turns your Wordpress admin into a Twitter client with status updates, URL shorteners, and the ability to tweet your posts as they are published.<br />
<img src="http://thatphpgirl.com/wp-content/uploads/2010/03/Picture-60.png" alt="Tweetable Twitter Wordpress Plugin" title="Tweetable Twitter Wordpress Plugin" width="491" height="254" class="centered size-full wp-image-477" /></li>
<li><strong><a href="http://wordpress.org/extend/plugins/twittercounter/" target="_new">TwitterCounter</a></strong><br />
TwitterCounter allows you to easily integrate and customize TwitterCounter.com followers and stats widgets for your sidebar.<br />
<img src="http://thatphpgirl.com/wp-content/uploads/2010/03/Picture-61.png" alt="Twitter Counter Twitter Wordpress Plugin" title="Twitter Counter Twitter Wordpress Plugin" width="221" height="218" class="centered size-full wp-image-476" /></li>
</ul>
<p>Good luck and happy developing!</p>
<p><em>Nikole Gipps is a punctilious web developer, marketing-minded writer, enthusiastic gardener, improvisational cook, loving wife, and fun mother of two. Read more about her work at <a href="http://thatphpgirl.com">That PHP Girl</a> or follow all of her adventures at <a href="http://www.nikolegipps.com">the nhgnikole mashup</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://thatphpgirl.com/10-useful-twitter-plugins-for-wordpress-that-work/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Lessons I Never Seem to Learn: TAKE PICTURES!</title>
		<link>http://thatphpgirl.com/lessons-never-learned-take-pictures/</link>
		<comments>http://thatphpgirl.com/lessons-never-learned-take-pictures/#comments</comments>
		<pubDate>Sun, 28 Feb 2010 21:41:53 +0000</pubDate>
		<dc:creator>Nikole</dc:creator>
				<category><![CDATA[DIY]]></category>
		<category><![CDATA[entrepreneur]]></category>
		<category><![CDATA[portfolio samples]]></category>
		<category><![CDATA[small business]]></category>
		<category><![CDATA[Testimonials]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://thatphpgirl.com/?p=450</guid>
		<description><![CDATA[I just did it again &#8212; I&#8217;m doing some major structural changes to a site and I forgot to take screenshots of the original before I started breaking it down. It&#8217;s the second time in 2 weeks!
Why is this important, you may ask? It&#8217;s simple: Your current work is the best source you have for [...]]]></description>
			<content:encoded><![CDATA[<p>I just did it again &mdash; I&#8217;m doing some major structural changes to a site and I forgot to take screenshots of the original before I started breaking it down. It&#8217;s the second time in 2 weeks!</p>
<p>Why is this important, you may ask? It&#8217;s simple: Your current work is the best source you have for new work. How am I going to talk about the different versions or things I did to certain sites if I don&#8217;t have the screenshots of the earlier versions? You&#8217;d think I would have learned my lesson after I kicked myself over this last week, but no &#8230; I went and did it again. I realized I should have taken version screenshots of <a href="http://www.rockstarweddingplanner.com/live" target="_new">Rockstar Wedding Planner LIVE</a> while I was rebuilding my portfolio on this site, and today I sat here adding some great new features to <a href="http://cherrytreeoccasions.com" target="_new">Cherry Tree Occasions</a> without taking a screenshot of the existing site before I started.</p>
<p><strong>Your take-home lesson for today: Remember to take lots of pictures.</strong> It doesn&#8217;t matter what industry you do, or what your product is, it is better to have too many pictures than to realize you have none. If you work with digital files, take screenshots. If you are a wedding planner, take pictures of the wedding. If you do teleseminars, save all the recordings of your calls. Don&#8217;t just save the final product, too &mdash; save the process, take notes of what happened, and gather testimonials about the event/product. The work you do today (and the people you work with) will always be your best source of future work, so don&#8217;t forget to beef up your portfolio and talk about your projects at every chance you get!</p>
<p><em>P.S. Thank you for the magic that is TextWrangler because I used about 700 undos to get the site back to the original on 4 files, saved as a backup version copy, used that for a screenshot, and then put the new version up again.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://thatphpgirl.com/lessons-never-learned-take-pictures/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>WordPress for E-Commerce, Part 1</title>
		<link>http://thatphpgirl.com/wordpress-for-e-commerce-part-1/</link>
		<comments>http://thatphpgirl.com/wordpress-for-e-commerce-part-1/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 18:37:35 +0000</pubDate>
		<dc:creator>Nikole</dc:creator>
				<category><![CDATA[DIY]]></category>
		<category><![CDATA[categories]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[custom template]]></category>
		<category><![CDATA[ecommerce]]></category>
		<category><![CDATA[online store]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[shopping cart]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[website]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress functions]]></category>

		<guid isPermaLink="false">http://thatphpgirl.com/?p=243</guid>
		<description><![CDATA[Today is part one of a three-part article on using Wordpress for E-Commerce. My goal is to create a sort of how-is-that-done series on using Wordpress as an easy content management tool for selling actual products. Some of these techniques can be implemented by anyone, whether you are an advanced programmer or a beginner to [...]]]></description>
			<content:encoded><![CDATA[<p>Today is part one of a three-part article on using Wordpress for E-Commerce. My goal is to create a sort of how-is-that-done series on using Wordpress as an easy content management tool for selling actual products. Some of these techniques can be implemented by anyone, whether you are an advanced programmer or a beginner to WordPress. Today&#8217;s example is from <a href="http://rockstarweddingplanner.com" target="_new">Rockstar Wedding Planner</a>, a recently relaunched site by <a href="http://www.thatphpgirl.com">That PHP Girl</a>.</p>
<h3>Why Use WordPress for E-Commerce?</h3>
<p>I have yet to find an e-commerce solution that I really like and that will do everything I need. Most of them are very complicated to do custom design on, or they are limited in terms of custom design in order to maintain functionality. The time-consuming nature of customizing e-commerce software is what makes an e-commerce site so expensive to make &#8230; and to be honest, most people don&#8217;t need a full-blown e-commerce solution because they won&#8217;t use most of the functionality, and/or they have very few products. Many people also don&#8217;t want a real store&mdash;they just want a way to throw in a few products into their content. So for those reasons, along with the ease of use and development of WordPress, finding a way to make WordPress work for e-commerce purposes makes sense.</p>
<h3>Anatomy of a Products Post</h3>
<p><a href="http://rockstarweddingplanner.com" target="_new">Rockstar Wedding Planner</a> has two main shopping areas: The products section and the coaching section.  <a href="http://rockstarweddingplanner.com/products/" target="_new">The products section</a> is just a category listing disguised as a page &mdash; it uses <a href="http://codex.wordpress.org/Function_Reference/WP_Query" target="_new">WP_Query</a> to pull all the posts from the products posting category and orders them by title. The loop then starts to display all the posts.</p>
<p>The first section is just a simple call to the <a href="http://codex.wordpress.org/Template_Tags/the_title" target="_new">the_title();</a> function in an h3 wrapper:</p>
<p><img src="http://thatphpgirl.com/wp-content/uploads/2009/09/post_anatomy1.png" alt="the_title();" /></p>
<p>The second section calls <a href="http://codex.wordpress.org/Template_Tags/the_content" target="_new">the_content();</a>, using the &lt;!&#8211;more&#8211;&gt; quicktag to control what is displayed on the page and what is displayed after the link.</p>
<p><img src="http://thatphpgirl.com/wp-content/uploads/2009/09/post_anatomy2.png" alt="the_content();" /></p>
<p>The third section calls a price for the product, and a description for that price if it is available (which it is when there is more than one price option). It starts out by finding out if a price is listed using a <a href="http://codex.wordpress.org/Using_Custom_Fields" target="_new">custom field</a>, displaying the description if there is one, and then displaying the price.</p>
<p><img src="http://thatphpgirl.com/wp-content/uploads/2009/09/post_anatomy3.png" alt="the_content();" /></p>
<p>The code for that looks like this:</p>
<blockquote><p>&lt;?php if (post_custom(&#8216;bundle_price&#8217;) == true) { ?&gt;&lt;p&gt;&lt;?php if (post_custom(&#8216;bundle_price_descrip&#8217;) == true) { ?&gt;&lt;?php echo post_custom(&#8216;bundle_price_descrip&#8217;); ?&gt; | &lt;?php } ?&gt;Price: &lt;?php echo post_custom(&#8216;bundle_price&#8217;); ?&gt;&lt;/p&gt;&lt;?php } ?&gt;</p>
</blockquote>
<p>The fourth block is the actual add to cart button. Because the button and the surrounding code for the display stays the same for all products, I opted to just pull the link for this button from a custom field. The admin for the site simply pulls the store link for this product from their payment processor and adds it to the custom field.</p>
<p><img src="http://thatphpgirl.com/wp-content/uploads/2009/09/post_anatomy4.png" alt="Add to Cart Button" /></p>
<p>Code:</p>
<blockquote><p>&lt;?php if (post_custom(&#8216;bundle_link&#8217;) == true) { ?&gt;&lt;div class=&#8221;btn-buy&#8221;&gt;&lt;a href=&#8221;&lt;?php echo post_custom(&#8216;bundle_link&#8217;); ?&gt;&#8221;&gt;&lt;img src=&#8221;http://www.mcssl.com/netcart/images/cart_buttons/cart_button_12.gif&#8221; style=&#8221;border:none; background:none;&#8221; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;?php } ?&gt;</p>
</blockquote>
<p>The final block is a learn more link, which could possibly go to the rest of that post, or it could go to another page entirely.</p>
<p><img src="http://thatphpgirl.com/wp-content/uploads/2009/09/post_anatomy5.png" alt="Add to Cart Button" /></p>
<p>This is also accomplished through custom fields, using an if statement to determine if there is a special link, or if <a href="http://codex.wordpress.org/Template_Tags/the_permalink" target="_new">the_permalink();</a> should just be called:</p>
<blockquote><p>&lt;div class=&#8221;btn-continue&#8221;&gt;&lt;?php if (post_custom(&#8216;bundle_learnmore_link&#8217;) == true) { ?&gt;&lt;a href=&#8221;&lt;?php echo post_custom(&#8216;bundle_learnmore_link&#8217;); ?&gt;&#8221;&gt;&lt;?php echo post_custom(&#8216;bundle_learnmore_text&#8217;); ?&gt;&lt;?php } else { ?&gt;&lt;a href=&#8221;&lt;?php the_permalink(); ?&gt;&#8221;&gt;Learn More&lt;?php } ?&gt;&lt;/a&gt;&lt;/div&gt;</p>
</blockquote>
<p>The coaching section pretty much follows the same functionality, with the biggest exception being that no link is display if a learn more link is not entered as a custom field, instead of using the_permalink(); as the else alternative.</p>
<h3>Want a code-free version?</h3>
<p>WordPress is built upon the structure of categories, posts and pages. Most modern E-Commerce software is built with categories, products and extra content pages. So why can&#8217;t &quot;products&quot; just be posts in the category of &quot;products&quot;? If you want to simplify this whole thing, you could just purchase an existing theme (or use whatever you are using now), and create a category of products. Inside this category, you would use a new post for every one of your products including the description, price, and a Buy It Now button. (Buy It Now buttons can easily be created through services like <a href="http://www.google.com/checkout" target=_new">Google Checkout</a>, <a href="http://www.paypal.com" target=_new">PayPal</a> and <a href="http://www.1shoppingcart.com" target=_new">1ShoppingCart</a>.) Once you have all your products in, your &quot;store&quot; would then just be your category listing, for example /category/products/.</p>
<p>One note: Depending on your version of WordPress and how you edit your pages, it may not work to paste in button code for the visual editor. To solve this problem, enter your text into the visual editor, save the post, and then click on the HTML editor to put the button code in, clicking update post after you are done.</p>
<p>Hopefully I have given my readers some good ideas about what they can do with their own sites, but remember&mdash;if you get stuck, <a href="http://thatphpgirl.com/please-assist-me/">I&#8217;m always here to help!</a></p>
<p>Coming up: Part 2 will be on using WordPress with a custom, on-site cart solution. Part 3 will be about using a plugin to create a shopping solution.</p>
]]></content:encoded>
			<wfw:commentRss>http://thatphpgirl.com/wordpress-for-e-commerce-part-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>&#8220;Small Changes&#8221; and Theme Purchases</title>
		<link>http://thatphpgirl.com/small-changes-and-theme-purchases/</link>
		<comments>http://thatphpgirl.com/small-changes-and-theme-purchases/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 23:29:05 +0000</pubDate>
		<dc:creator>Nikole</dc:creator>
				<category><![CDATA[DIY]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[theme customization]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[website]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://thatphpgirl.com/?p=225</guid>
		<description><![CDATA[I helped a friend out with some small changes to his site recently, Selling the Startup, and it reminded me what happens when a &#34;quick fix&#34; turns into a major problem. Sometimes themes can be a gamble&#8212;just like purchasing the services of any web company&#8212;so it is important to check out reviews and references before [...]]]></description>
			<content:encoded><![CDATA[<p>I helped a friend out with some small changes to his site recently, <a href="http://www.sellingthestartup.com" target="_new">Selling the Startup</a>, and it reminded me what happens when a &quot;quick fix&quot; turns into a major problem. Sometimes themes can be a gamble&mdash;just like purchasing the services of any web company&mdash;so it is important to check out reviews and references before signing your name on the line. I&#8217;ve had great luck with all of the <a href="http://www.woothemes.com/category/themes/" target="_new">Woo Themes</a> I have used so far, but there are a lot of people out there making Wordpress themes for purchase now. I don&#8217;t like to pick on anyone, but it just gets to be a problem when a theme is blocking the display of a user-installed plugin or widget, forcing me to redo the CSS or change the code to make it work. This is just frustrating for me as a developer, and frustrating to a client who has to pay for a simple modification that turns out to be anything but simple.</p>
<p>Of course, if you do get stuck, <a href="http://thatphpgirl.com/please-assist-me/">I&#8217;m always here to help</a>. And Mark, go ahead and tweet your heart out now.</p>
]]></content:encoded>
			<wfw:commentRss>http://thatphpgirl.com/small-changes-and-theme-purchases/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A Custom WordPress Blog Archives Page</title>
		<link>http://thatphpgirl.com/a-custom-wordpress-blog-archives-page/</link>
		<comments>http://thatphpgirl.com/a-custom-wordpress-blog-archives-page/#comments</comments>
		<pubDate>Sun, 02 Aug 2009 15:05:43 +0000</pubDate>
		<dc:creator>Nikole</dc:creator>
				<category><![CDATA[DIY]]></category>
		<category><![CDATA[categories]]></category>
		<category><![CDATA[category achives]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[custom template]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[post archives]]></category>
		<category><![CDATA[user experience]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[website]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress functions]]></category>

		<guid isPermaLink="false">http://thatphpgirl.com/?p=155</guid>
		<description><![CDATA[Note: This post assumes you know how to use custom page templates in WordPress as well as know how to edit text php files and upload them through FTP. If you are already lost, you can always hire me to make your custom blog archive page for you.
I make a lot of sites that use [...]]]></description>
			<content:encoded><![CDATA[<p><em>Note: This post assumes you know how to use custom page templates in WordPress as well as know how to edit text php files and upload them through FTP. If you are already lost, you can always <a href="http://thatphpgirl.com/please-assist-me/">hire me to make your custom blog archive page</a> for you.</em></p>
<p>I make a lot of sites that use WordPress as a content management system (CMS) but not with the blog as the front page. For these, I use posts and categories to make various sections of the site using custom templates. My latest example of that is the Blog, Q&amp;A and Latest News sections of the site Hear Florida. For this, I wanted to make an archive page which lists all the categories, subcategories, and posts in what is technically the blog. I am sure someone is going to tell me that a plugin exists to do this thing, but as I tried two that didn&#8217;t work well, I had decided to give up and just use PHP. I also wanted to use as many standard WordPress calls as I could instead of just writing all my own functions.</p>
<p>In this exercise, this is what our final product will look like: <a href="http://www.hearflorida.com/blog-archive/">All Blog Posts Archive &raquo; Hear Florida Audiology Group</a>. It was created in a custom template called &quot;All Posts Archive&quot;. I will be breaking this down by parts and explaining what each part means to help my readers not only see the code, but to know what each part does. I will break this down piece by piece, but as a preview our final code will look like the chunk below.</p>
<blockquote><p>&lt;?php<br />
&nbsp;&nbsp;&nbsp;$all_cats = wp_list_categories(&#8216;hide_empty=0&#038;echo=0&#038;title_li=&#038;exclude=1&#8242;);<br />
&nbsp;&nbsp;&nbsp;$cats_list = explode(&quot;&lt;&quot;, $all_cats);<br />
&nbsp;&nbsp;&nbsp;$build_cat_structure = array();<br />
&nbsp;&nbsp;&nbsp;$array_counter = 0;<br />
&nbsp;&nbsp;&nbsp;foreach ($cats_list as $value) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$string_start = substr($value, 0, 3);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ($string_start == &quot;li &quot; || $string_start == &quot;/a&gt;&quot; || $string_start == &quot;/li&quot;) { <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;continue; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elseif ($string_start == &quot;ul &quot;) { <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$build_cat_structure[$array_counter] = &quot;start_child&quot;; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$array_counter = $array_counter + 1; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elseif ($string_start == &quot;/ul&quot;) { <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$build_cat_structure[$array_counter] = &quot;end_child&quot;; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$array_counter = $array_counter + 1; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elseif ($string_start == &quot;a h&quot;) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$cat_name = explode(&quot;&gt;&quot;, $value);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$build_cat_structure[$array_counter] = $cat_name[1];<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$array_counter = $array_counter + 1;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;echo &quot;&lt;ul&gt;&quot;;<br />
&nbsp;&nbsp;&nbsp;foreach ($build_cat_structure as $value) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ($value == &quot;start_child&quot;) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo &quot;&lt;ul&gt;\n&quot;;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elseif ($value == &quot;end_child&quot;) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo &quot;&lt;/ul&gt;\n&quot;;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$category_id = get_cat_id($value);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo &#8216;&lt;li&gt;&lt;a href=&quot;&#8217; . get_category_link($category_id) . &#8216;&quot;&gt;&#8217; . category_description($category_id) . &quot;&lt;/a&gt;&lt;/li&gt;\n&quot;;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$children = wp_list_categories(&#8216;echo=0&#038;child_of=&#8217; . $category_id . &#8216;&#038;title_li=&#8217;);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$find_me = stripos($children, &quot;No categories&quot;);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ($find_me !== FALSE) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo &quot;&lt;ul&gt;\n&quot;;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$the_query = new WP_Query(&#8216;cat=&#8217; . $category_id);&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while ($the_query-&gt;have_posts()) : $the_query-&gt;the_post(); $do_not_duplicate = $post-&gt;ID; ?&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;&lt;a title=&quot;&lt;?php the_title(); ?&gt;&quot; href=&quot;&lt;?php the_permalink(); ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/li&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;?php endwhile;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo &quot;&lt;/ul&gt;\n&quot;;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;echo &quot;&lt;/ul&gt;&quot;;<br />
?&gt;</p></blockquote>
<p>The first part pulls the categories and puts them into a list. If you wanted to shape the final outcome of the display, you could change the settings of wp_list_categories() here. For example, setting hide_empty=1 instead of 0, you could hide any categories that you have without posts. I have chosen to exclude the Uncategorized category (category #1), but if you wanted yours listed just removed the exclude=1 part. Or, if you would like to exclude other categories, just list them by number (exclude=1,5,6 for example). The echo=0 is important here because it puts the results into a variable instead of displaying them.</p>
<blockquote><p>&nbsp;&nbsp;&nbsp;$all_cats = wp_list_categories(&#8216;hide_empty=0&#038;echo=0&#038;title_li=&#038;exclude=1&#8242;);</p></blockquote>
<p>Once the result of <a href="http://codex.wordpress.org/Template_Tags/wp_list_categories">wp_list_categories</a> is dumped into the variable all_cats, it is broken apart into text chunks using the character &lt; as the divider.</p>
<blockquote><p>&nbsp;&nbsp;&nbsp;$cats_list = explode(&quot;&lt;&quot;, $all_cats);</p></blockquote>
<p>This basically puts every html chunk into it&#8217;s own entry in an array. (If at any point you want to see your results, feel free to do a var_dump($last_variable); and it will show you what you are working with.) I do this to set up the processing of the information in the next set of steps.</p>
<blockquote><p>&nbsp;&nbsp;&nbsp;$build_cat_structure = array();<br />
&nbsp;&nbsp;&nbsp;$array_counter = 0;</p></blockquote>
<p>This sets up an empty array which we will fill in the loop below, and starts our array key counter at 0.</p>
<blockquote><p>&nbsp;&nbsp;&nbsp;foreach ($cats_list as $value) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$string_start = substr($value, 0, 3);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ($string_start == &quot;li &quot; || $string_start == &quot;/a&gt;&quot; || $string_start == &quot;/li&quot;) { <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;continue; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elseif ($string_start == &quot;ul &quot;) { <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$build_cat_structure[$array_counter] = &quot;start_child&quot;; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$array_counter = $array_counter + 1; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elseif ($string_start == &quot;/ul&quot;) { <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$build_cat_structure[$array_counter] = &quot;end_child&quot;; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$array_counter = $array_counter + 1; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elseif ($string_start == &quot;a h&quot;) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$cat_name = explode(&quot;&gt;&quot;, $value);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$build_cat_structure[$array_counter] = $cat_name[1];<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$array_counter = $array_counter + 1;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;}</p></blockquote>
<p>This is where I have it to loop through the array I made by the earlier <a href="http://www.php.net/explode">explode()</a> command to set up the final array which will produce the display. By taking the first three letters of each array item as a seed, I can see where the html is going and reflect that in the final build. If the string starts with something that doesn&#8217;t influence the final outcome (the start of a list item, the end of a list item, and the end of a anchor tag), the command continue is issued to loop forward on to the next item. If hierarchy is detected (the start or end of an unordered list), a designation is added into the array and the counter advances. If the start of a link is detected (&quot;a h&quot; is the start of a href), it breaks apart that line using explode to pull out the name of the category. The category name is then added to the array and the counter is advanced.</p>
<p>These last parts are where I put it all together and display the data by looping through the array I built earlier ($build_cat_structure). You could probably do this differently or combine the above and below parts instead of looping through twice, but I liked it like this so I could use the data in other ways if I wanted to.</p>
<blockquote><p>&nbsp;&nbsp;&nbsp;echo &quot;&lt;ul&gt;&quot;;<br />
&nbsp;&nbsp;&nbsp;foreach ($build_cat_structure as $value) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ($value == &quot;start_child&quot;) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo &quot;&lt;ul&gt;\n&quot;;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elseif ($value == &quot;end_child&quot;) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo &quot;&lt;/ul&gt;\n&quot;;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</p></blockquote>
<p>This makes/ends a nested unordered list If it hits my start/end child marker, which makes the category hierarchy work. This is also a good chance to add specific styling to the inside nest lists, if that is what you want.</p>
<blockquote><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$category_id = get_cat_id($value);</p></blockquote>
<p>The start of the else tells the script what to do if it encounters the name of a category, or something that is not the start or end of a nested list. The next line converts our category name to a category ID using the <a href="http://codex.wordpress.org/Function_Reference/get_cat_ID">get_cat_id()</a> function.</p>
<blockquote><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo &#8216;&lt;li&gt;&lt;a href=&quot;&#8217; . get_category_link($category_id) . &#8216;&quot;&gt;&#8217; . category_description($category_id) . &quot;&lt;/a&gt;&lt;/li&gt;\n&quot;;</p></blockquote>
<p>This displays the category in a list item with a link to the archive of that category using <a href="http://codex.wordpress.org/Function_Reference/get_category_link">get_category_link()</a>. I use <a href="http://codex.wordpress.org/Template_Tags/category_description">category_description()</a> here because my template is set up where the category name is a shorter version that is used for the sidebar and the category description is a longer version used for display. If you wanted to use the name instead, just replace category_description($category_id) with $value.</p>
<blockquote><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$children = wp_list_categories(&#8216;echo=0&#038;child_of=&#8217; . $category_id . &#8216;&#038;title_li=&#8217;);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$find_me = stripos($children, &quot;No categories&quot;);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ($find_me !== FALSE) {</p></blockquote>
<p>This special handling function checks to see if the current category is a parent of other categories. For example, on my final page (<a href="http://www.hearflorida.com/blog-archive/">All Blog Posts Archive &raquo; Hear Florida Audiology Group</a>), there is a main category of Blog for which I don&#8217;t want the posts listed. I want the posts listed under their sub categories, so it skips the post by post listing if the current category is a parent of other categories. A category that is not a parent of others will have something like &quot;&lt;li&gt;No Categories&lt;/li&gt;&quot; as the result of the above <a href="http://codex.wordpress.org/Template_Tags/wp_list_categories">wp_list_categories(child_of=)</a> call. The ($find_me !== FALSE) part creates a situation where the posts are only being displayed where the phrase &#8220;No Categories&#8221; is found.</p>
<blockquote><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo &quot;&lt;ul&gt;\n&quot;;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$the_query = new WP_Query(&#8216;cat=&#8217; . $category_id);&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while ($the_query-&gt;have_posts()) : $the_query-&gt;the_post(); $do_not_duplicate = $post-&gt;ID; ?&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;&lt;a title=&quot;&lt;?php the_title(); ?&gt;&quot; href=&quot;&lt;?php the_permalink(); ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/li&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;?php endwhile;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo &quot;&lt;/ul&gt;\n&quot;;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;echo &quot;&lt;/ul&gt;&quot;;</p></blockquote>
<p>This last part creates another nesting with all of the posts for each category using <a href="http://codex.wordpress.org/Function_Reference/WP_Query">WP_Query</a>. The posts are displayed with their title and permalinks. Then everything is closed up and all the unordered lists are given end tags.</p>
<p>Overall I am pleased with my results and how it turned out in terms of giving the user a clear way to look through older posts by category and view all posts as a whole.</p>
]]></content:encoded>
			<wfw:commentRss>http://thatphpgirl.com/a-custom-wordpress-blog-archives-page/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Tracking WordPress Theme Updates &amp; Changes</title>
		<link>http://thatphpgirl.com/tracking-wordpress-theme-updates-hanges/</link>
		<comments>http://thatphpgirl.com/tracking-wordpress-theme-updates-hanges/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 15:56:02 +0000</pubDate>
		<dc:creator>Nikole</dc:creator>
				<category><![CDATA[DIY]]></category>
		<category><![CDATA[changes]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[theme customization]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://thatphpgirl.com/?p=138</guid>
		<description><![CDATA[Wordpress updates always seem easy, but when you make custom changes to your theme you will need to keep track of those in order to bring the changes to the next version. The easiest way to do this is to make a php comment in your template. For example, you might write a note like [...]]]></description>
			<content:encoded><![CDATA[<p>Wordpress updates always seem easy, but when you make custom changes to your theme you will need to keep track of those in order to bring the changes to the next version. The easiest way to do this is to make a php comment in your template. For example, you might write a note like this for yourself:</p>
<blockquote><p>&lt;?php // Changed from using thumbs.php to displaying full image. ?&gt;</p>
</blockquote>
<p>This way, if you are using a theme framework for your site, you can known which customizations you should move over to the new version.</p>
<p>Why use PHP comments instead of HTML comments? HTML comments will still show up when you view source on a page. PHP comments are removed by the PHP engine before the page is sent to the browser.</p>
]]></content:encoded>
			<wfw:commentRss>http://thatphpgirl.com/tracking-wordpress-theme-updates-hanges/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Changing your Wordpress URL (Fantastico Install)</title>
		<link>http://thatphpgirl.com/changing-your-wordpress-url-fantastico-install/</link>
		<comments>http://thatphpgirl.com/changing-your-wordpress-url-fantastico-install/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 02:04:17 +0000</pubDate>
		<dc:creator>Nikole</dc:creator>
				<category><![CDATA[DIY]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[Fantastico]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[phpmyadmin]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://thatphpgirl.com/?p=123</guid>
		<description><![CDATA[If you used parts of my post on Moving and Upgrading your WordPress to change your blog&#8217;s URL (if say, for example, you were trying to take a development site live with the final URL), and something still isn&#8217;t working right, check your .htaccess and wp-config.php files&#8212;especially if you installed WordPress through Fantastico.
I recently ran [...]]]></description>
			<content:encoded><![CDATA[<p>If you used parts of my post on <a href="http://thatphpgirl.com/moving-and-upgrading-your-wordpress/">Moving and Upgrading your WordPress</a> to change your blog&#8217;s URL (if say, for example, you were trying to take a development site live with the final URL), and something still isn&#8217;t working right, check your .htaccess and wp-config.php files&mdash;especially if you installed WordPress through Fantastico.</p>
<p>I recently ran into this problem on <a href="http://www.sheandheplanweddings.com/">She &amp; He Plan Weddings</a>. I had changed the blog&#8217;s URL in phpMyAdmin, but several items were still not working (including the admin) because it was directing me back to the development URL. I checked and rechecked the WordPress settings, the database, everything. The problem was with .htaccess and wp-config.php. I didn&#8217;t install WordPress on this site&mdash;I only came in to redo the theme and make some customizations&mdash;and I&#8217;ve always used a fresh Wordpress.org install instead of using host-based installers.</p>
<p>The first problem was with .htaccess. Somehow the .htaccess file became unwritable (whether it was intentional by the blog installer or it is some Fantastico default), and the new blog URL was not being reflected. Changing the .htaccess file from this:</p>
<blockquote><p># BEGIN WordPress<br />
&lt;IfModule mod_rewrite.c&gt;<br />
RewriteEngine On<br />
RewriteBase /~ciaraine/<br />
RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteCond %{REQUEST_FILENAME} !-d<br />
RewriteRule . /~ciaraine/index.php [L]<br />
&lt;/IfModule&gt;</p>
<p># END WordPress</p>
</blockquote>
<p>to this:</p>
<blockquote><p># BEGIN WordPress<br />
&lt;IfModule mod_rewrite.c&gt;<br />
RewriteEngine On<br />
RewriteBase /<br />
RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteCond %{REQUEST_FILENAME} !-d<br />
RewriteRule . /index.php [L]<br />
&lt;/IfModule&gt;</p>
<p># END WordPress</p>
</blockquote>
<p>solved that problem entirely. If you&#8217;ll see, the first one was assuming the site&#8217;s URL should be http://gator872.hostgator.com/~ciaraine/, as it was in development. The second one reflects the removal of the directory, as the final site appeared to be at a root level at <a href="http://www.sheandheplanweddings.com/">http://www.sheandheplanweddings.com/</a>.</p>
<p>For more information (and to prevent problems for yourself), <a href="http://codex.wordpress.org/Changing_File_Permissions">WordPress has this guide on how to make your files have the correct permissions</a>. If you want to leave the .htaccess file unwritable, you&#8217;ll have to use the method I have outlined here.</p>
<p>The second problem was with the wp-config.php file, which is located in the root folder of your WordPress install. A Fantastico install includes this line:</p>
<blockquote><p>define(&#8216;WP_SITEURL&#8217;, &#8216;http://your-url-here.com&#8217;);</p>
</blockquote>
<p>that I have never seen on a self-installed WordPress installation. (Just to be sure, I <a href="http://wordpress.org/download/">downloaded the new WordPress 2.8.1</a> and checked the wp-config-sample.php file&mdash;and no, it&#8217;s not in there.) This line, again, was forcing the URL to be the original http://gator872.hostgator.com/~ciaraine/ instead of the new <a href="http://www.sheandheplanweddings.com/">http://www.sheandheplanweddings.com/</a>. I set this element to read</p>
<blockquote><p>define(&#8216;WP_SITEURL&#8217;, &#8216;http://www.sheandheplanweddings.com&#8217;);</p>
</blockquote>
<p>but I probably could have just deleted out the line entirely as well.</p>
<p>I hope this post saves someone else from the hassle I just went through trying to push this site live. I think the whole experience also reinforced my habit of doing things &quot;the long way&quot; (by downloading WordPress and installing it myself) instead of relying on one-click installers like Fantastico. While these sort of things are good for those who are unfamiliar with installing software or for saving time, I think there is value into knowing every setting going into your install by doing it yourself.</p>
]]></content:encoded>
			<wfw:commentRss>http://thatphpgirl.com/changing-your-wordpress-url-fantastico-install/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Moving and Upgrading your WordPress</title>
		<link>http://thatphpgirl.com/moving-and-upgrading-your-wordpress/</link>
		<comments>http://thatphpgirl.com/moving-and-upgrading-your-wordpress/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 05:34:13 +0000</pubDate>
		<dc:creator>Nikole</dc:creator>
				<category><![CDATA[DIY]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[phpmyadmin]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://thatphpgirl.com/?p=103</guid>
		<description><![CDATA[Note: This post assumes you are using the self-installed WordPress on a Linux-based server running MySQL and phpMyAdmin. It also assumes that all your current plugins and your current theme is compatible with the latest version of WordPress.
Please read through all of these instructions and make sure you know what they mean before you begin. [...]]]></description>
			<content:encoded><![CDATA[<p><i>Note: This post assumes you are using the self-installed WordPress on a Linux-based server running MySQL and phpMyAdmin. It also assumes that all your current plugins and your current theme is compatible with the latest version of WordPress.</i></p>
<p>Please read through all of these instructions and make sure you know what they mean before you begin. Backing up your site and database before any transfer is always a wise move.</p>
<h2>Step 1: Download your Database</h2>
<p>Log into your database through phpMyAdmin and go to the Export tab. Use these values for your export:</p>
<ul>
<li>Export ALL TABLES in SQL format.</li>
<li>Check STRUCTURE, and then &quot;Add IF NOT EXISTS&quot;, &quot;Add AUTO_INCREMENT value&quot;, and &quot;Enclose table and field names with backquotes&quot;.</li>
<li>Check DATA and then &quot;Complete inserts&quot;, &quot;Extended inserts&quot;, &quot;Use hexadecimal for BLOB&quot;, and &quot;Export type INSERT&quot;.</li>
<li>Check SAVE AS FILE and save to your hard drive.</li>
</ul>
<h2>Step 2: Download your Current Site</h2>
<p>FTP to your current site and download the following items:</p>
<ul>
<li>The folder WP-CONTENT.</li>
<li>The file WP-CONFIG.PHP.</li>
<li>Any files or folders you may have added outside the WordPress structure, like a CSS or IMAGES directory.</li>
</ul>
<h2>Step 3: Upload your New WordPress</h2>
<p>For a general discussion of installing WordPress, see the <a href="http://codex.wordpress.org/Installing_WordPress#Famous_5-Minute_Install">5-minute Installation Guide at WordPress.org</a>. For this, you will be doing things a bit differently because you are transferring a blog, not just installing a new one.</p>
<ol>
<li><a href="http://wordpress.org/download/">Download the latest version of WordPress</a>. Unpack the files and upload everything but the WP-CONFIG-SAMPLE.PHP file to your new server.</li>
<li>Upload your old custom theme (in the WP-CONTENT folder you downloaded earlier) and any images/css/etc you may have had outside the WordPress folder structure at your old site.</li>
<li>Open the new WP-CONFIG-SAMPLE.PHP file and your old WP-CONFIG.PHP file. You will be modifying the WP-CONFIG-SAMPLE.PHP file. Follow the instructions in the file to get your <a href="https://api.wordpress.org/secret-key/1.1/">Secret API Key</a>. Then use the information in your old WP-CONFIG.PHP for the database and username, and get the hostname from your new host. Save this WP-CONFIG-SAMPLE.PHP file on your hard drive, rename it to WP-CONFIG.PHP and upload it to your new server at the root file level. (See below for additional notes on the WP-CONFIG.PHP file and changes you may have to make to it.)</li>
<li>Hold off on uploading your existing plugins until you are sure your upgrade installation is working.</li>
</ol>
<h2>Step 4: Set Up your New Database</h2>
<p>Log into the phMyAdmin on your new host, click on the Import tab, and Import the SQL file you downloaded in step 1. If for some reason you can&#8217;t use the original database and/or username, make sure you put the new database and/or username in your WP-CONFIG.PHP file on your new server. If you have changed your base URL, see the special instructions below before proceeding on to step 5.</p>
<h2>Step 5: Install and Upgrade your Database</h2>
<p>Go to the install URL on your new site, http://example.com/wp-admin/install.php for example, and follow the instructions to install WordPress and upgrade the database (if needed/prompted to do so).</p>
<h2>Step 6: Add Plugins</h2>
<p>If you had plugins originally installed, and your site is now working, you can upload the plugins in your original WP-CONTENT/PLUGINS folder back to the new site. Once they are uploaded, the WP-ADMIN will tell you if there are updates available for these plugins before you enable them.</p>
<h2>Special Step: If You Changed the URL</h2>
<p>If you have changed the site URL, or you&#8217;ve gone from a temporary URL (such as http://hostname.com/~your_account/) to your permanent URL (http://www.your_domain.com), you will need to follow this additional instruction between steps 4 and 5 above:</p>
<ol>
<li>Log in to phpMyAdmin and click on the SQL tab.</li>
<li>Enter the following code into the SQL window<br />
<blockquote><p>
UPDATE wp_options SET option_value = &#8216;http://new-url.com&#8217; WHERE option_name = &#8216;home&#8217;;<br />
UPDATE wp_options SET option_value = &#8216;http://new-url.com&#8217; WHERE option_name = &#8217;siteurl&#8217;;<br />
UPDATE wp_posts SET guid = replace(guid, &#8216;http://old-url.com&#8217;,'http://new-url.com&#8217;);<br />
UPDATE wp_posts SET post_content = replace(post_content, &#8216;http://old-url.com&#8217;, &#8216;http://new-url.com&#8217;);
</p></blockquote>
<p>replacing &quot;http://new-url.com&quot; with your new URL, &quot;http://old-url.com&quot; with your old URL, and wp_ (as in wp_posts, wp_options) with your table prefix. (The default on WordPress is wp_ but you may have changed it on your previous installation. If your default is not wp_ in your tables, you&#8217;ll also make sure this table prefix is reflected in your new WP-CONFIG.PHP file and re-upload before proceeding to step 5.)</li>
</ol>
<p>And there you have it! If you need additional assistance or your custom theme needs to be updated to work with the newest version of WordPress, consider <a href="http://thatphpgirl.com">hiring That PHP Girl</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://thatphpgirl.com/moving-and-upgrading-your-wordpress/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
