<?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>The Theme Foundry &#187; Tutorials</title>
	<atom:link href="http://thethemefoundry.com/blog/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://thethemefoundry.com</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Tue, 22 May 2012 19:41:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Adding extra gallery pages to Photography</title>
		<link>http://thethemefoundry.com/blog/adding-extra-gallery-pages-to-photography/</link>
		<comments>http://thethemefoundry.com/blog/adding-extra-gallery-pages-to-photography/#comments</comments>
		<pubDate>Thu, 17 Mar 2011 19:41:32 +0000</pubDate>
		<dc:creator>Drew Strojny</dc:creator>
				<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://thethemefoundry.com/blog/?p=2614</guid>
		<description><![CDATA[Update November 8, 2011 Extra gallery pages are now possible using the gallery shortcode. If you&#8217;re running Photography 1.4 or later, you do not need to make the changes in this tutorial &#8211; see your theme documentation for instructions on creating multiple gallery pages. With the release of Photography 1.2 the Gallery post type now [...]]]></description>
			<content:encoded><![CDATA[<div class="notice"><strong>Update November 8, 2011</strong> Extra gallery pages are now possible using the <code>gallery</code> shortcode. If you&#8217;re running Photography 1.4 or later, you do not need to make the changes in this tutorial &#8211; see your theme documentation for instructions on creating multiple gallery pages.</div>
<p>With the release of Photography 1.2 the Gallery post type now includes built-in support for categories. Why is this useful? By default Photography shows <strong>all</strong> your galleries on one &#8220;Gallery Page&#8221;. With category support you may now create new gallery pages that only show galleries associated with a specific category.  Our newest forum moderator, Mike Fields, wrote up an awesome tutorial on how to do just that. Thanks Mike! Before you get started, be sure to read through this tutorial: <a href="http://thethemefoundry.com/tutorials/#basics-customizing">Customizing your theme &rarr; Editing a template file</a>.</p>
<p><span id="more-2614"></span></p>
<ol>
<li>Create a new category and give it a name representative of the collection of galleries that you would like to create. I&#8217;ll be using &#8220;Nature Shots&#8221; as an example, but the name you use can be anything you like.</li>
<li>Assign all galleries that you wish to appear on your custom page to this category.</li>
<li>Now you will need to create a custom page template to display all galleries in this category on one page. Copy the file named <code>gallery.php</code> from the <code>photography_pro</code> theme folder into your PRO child theme folder. You will want to rename it as well. If the category you created has the title &#8220;Nature Shots&#8221;, I would suggest naming the template <code>gallery-nature-shots.php</code>. It&#8217;s a good practice to use only lowercase letters and the dash character (-) when naming files. Never use spaces.</li>
<li>Next you will need to change the name of the page template you just created. The template name is located at the top of the file and looks like this:
<pre lang="php">
<code>/*
Template Name: Gallery
*/</code>
</pre>
<p>You will want to give it a name that is similar to the name of the category you created in the first step. If the category was &#8220;Nature Shots&#8221;, I would suggest something like this:</p>
<pre lang="php">
<code>/*
Template Name: Nature Shots Gallery
*/</code>
</pre>
<p>It&#8217;s a good practice not to use any punctuation here. Just use letters and spaces for best results.</p>
</li>
<li>Now you will need to adjust the query. The original query is located on line 8 and looks like this:
<pre lang="php"><code>&lt;?php query_posts( 'post_type=gallery&amp;orderby=menu_order&amp;nopaging=true&amp;order=ASC' ); ?&gt;</code></pre>
<p>you will want to replace this line with the following code:</p>
<pre><code>&lt;?php
query_posts( array(
'post_type'     =&gt; 'gallery',
'orderby'       =&gt; 'menu_order',
'nopaging'      =&gt; 'true',
'order'         =&gt; 'ASC',
'category_name' =&gt; 'Nature Shots'
) );
?&gt;
</code></pre>
</li>
<li>Save your changes and upload the new page template to your server (if it isn&#8217;t already there). If you&#8217;re confused about uploading a file be sure to watch the <a href="http://thethemefoundry.com/tutorials/video/#ftp">video tutorial on how to use an FTP client</a>.</li>
<li>Create a new page in WordPress by expanding the &#8220;Pages&#8221; tab in the admin menu and clicking the &#8220;Add New&#8221; link. Be sure to give the page a title similar to the category name. I used &#8220;Nature Shots&#8221;.</li>
<li>On the right-hand side of the screen, you should see a meta box with the heading &#8220;Page Attributes&#8221;. You will want to select the page template we just created from the &#8220;Template&#8221; dropdown. If you do not see this box, you will want to click the &#8220;Screen Options&#8221; tab (located in the upper right of the screen) and make sure that the &#8220;Page Attributes&#8221; option is checked.</li>
<li>Publish your page! Now add the new page to your menu via <em>Appearance &rarr; Menus</em>. When you visit the page you should see only the galleries that have been associated with the &#8220;Nature Shots&#8221; category.</li>
</ol>
<p>Enjoyed this tutorial? Let us know in the comments. If you have any questions or problems please head over to the <a href="/forums/">support forums</a> and we&#8217;ll be happy to help you out. <img src="http://thethemefoundry.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=2614" width="1" height="1" style="display: none;" /></p>
]]></content:encoded>
			<wfw:commentRss>http://thethemefoundry.com/blog/adding-extra-gallery-pages-to-photography/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Add captions to your Photography gallery page</title>
		<link>http://thethemefoundry.com/blog/add-captions-photography-gallery/</link>
		<comments>http://thethemefoundry.com/blog/add-captions-photography-gallery/#comments</comments>
		<pubDate>Thu, 28 Oct 2010 23:08:42 +0000</pubDate>
		<dc:creator>Drew Strojny</dc:creator>
				<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://thethemefoundry.com/blog/?p=2246</guid>
		<description><![CDATA[Update November 8, 2011 Captions on your galleries are now available through your Theme Options panel. If you&#8217;re running Photography 1.4 or later, you do not need to make the changes in this tutorial. We have had several requests in the Photography theme support forum for instructions on how to add captions to the main [...]]]></description>
			<content:encoded><![CDATA[<div class="notice"><strong>Update November 8, 2011</strong> Captions on your galleries are now available through your Theme Options panel. If you&#8217;re running Photography 1.4 or later, you do not need to make the changes in this tutorial.</div>

<p>We have had several requests in the Photography theme support forum for instructions on how to add captions to the main gallery page. By default, <a href="/photography/">Photography</a> shows a &#8220;featured thumbnail&#8221; image of a chosen photo from your gallery with no text. In this tutorial I am going to walk you through adding two different caption styles to your gallery page. Let&#8217;s get started!</p>

<span id="more-2246"></span>

<h3>Edit the gallery template</h3>

<p>We need to add the gallery title to our gallery template by editing the <code>/photography_pro/gallery.php</code> file. Be sure to read through the <a href="http://thethemefoundry.com/tutorials/#basics-customizing">editing a template file tutorial</a> before jumping in. Open up your freshly copied <code>gallery.php</code>  file and find the code below (starts on line 23).</p>

<pre><code>      &lt;/a&gt;
    &lt;/li&gt;
  &lt;?php endwhile; ?&gt;
&lt;/ul&gt;
</code></pre>

<p>Add the <a href="http://codex.wordpress.org/Function_Reference/the_title">post title template tag</a> just above the closing <code>&lt;/li&gt;</code> and wrap it in an <code>&lt;h5&gt;</code> (shown below).</p>

<pre><code>      &lt;/a&gt;
      &lt;h5&gt;&lt;?php echo the_title(); ?&gt;&lt;/h5&gt;
    &lt;/li&gt;
  &lt;?php endwhile; ?&gt;
&lt;/ul&gt;
</code></pre>

<h3>Add basic styling</h3>

<p><img class="aligncenter" src="http://thethemefoundry.com/wp-content/uploads/photography-gallery-captions/basic-captions.jpg" alt="Screenshot of basic caption styling" /></p>

<p>The gallery title will now show up on your gallery page underneath each thumbnail, but it doesn&#8217;t have any styling. We need to add some CSS to clean things up a bit. Be sure to read through the <a href="http://thethemefoundry.com/tutorials/#basics-customizing">adding custom CSS styles tutorial</a> before you make any changes.</p>

<p>Open up your <code>/photography_pro_child/style.css</code> file and scroll all the way to the bottom.</p>

<pre><code>/* Make all custom CSS changes BELOW this line
-----------------------------------------------------------*/
/* Example: Change the sidebar background to blue:
#sidebar {
    background: blue;
}
*/
</code></pre>

<p>Add some styling to the new <code>&lt;h5&gt;</code> element by replacing that code with the code below, which adds margin above the text, centers it, and makes it a bit larger.</p>

<pre><code>/* Make all custom CSS changes BELOW this line
-----------------------------------------------------------*/
li.g-thumb h5 {
    margin: 10px 0 0 0;
    text-align: center;
    font-size: 1.3em;
}
</code></pre>

<h3>Add fancy hover styling</h3>

<p><img class="aligncenter" src="http://thethemefoundry.com/wp-content/uploads/photography-gallery-captions/hover-captions.jpg" alt="Screenshot of fancy caption styling" /></p>

<p>If you prefer a fancier &#8220;hover only&#8221; caption use this code instead.</p>

<pre><code>/* Make all custom CSS changes BELOW this line
-----------------------------------------------------------*/
#gallery ul li {
   height: 195px;
}
li.g-thumb h5 {
    display: none;
}
li.g-thumb:hover h5 {
    display: block;
    margin-top: -97.5px;
    font-size: 2em;
    line-height: 0;
    text-align: center;
    color: #fff;
}
#gallery ul li a:hover img {
    opacity: .25;
}
</code></pre>

<p>Here is a summary of each CSS property / value pair listed above.</p>

<ol>
<li>Hide the <code>&lt;h5&gt;</code> tag by default.</li>
<li>Show the <code>&lt;h5&gt;</code> tag when hovering over the thumbnail.</li>
<li>Add a negative margin to center the text vertically on the thumbnail.</li>
<li>Increase the font size to 20px.</li>
<li>Zero out the line height so the negative margin we specified above works properly.</li>
<li>Center the text.</li>
<li>Set the color to white.</li>
<li>Turn down the opacity on hover so the text is more noticable.</li>
</ol>

<h3>Enjoy your captions!</h3>

<p>These captions have been tested and are working in the latest versions of Firefox, Safari, Opera, and Chrome. The second hover method doesn&#8217;t look as great in Internet Explorer because it doesn&#8217;t support the opacity property (unless you are using the IE9 Beta).</p>
 <img src="http://thethemefoundry.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=2246" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://thethemefoundry.com/blog/add-captions-photography-gallery/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>Create beautiful buttons in Photoshop</title>
		<link>http://thethemefoundry.com/blog/button-tutorial-photoshop/</link>
		<comments>http://thethemefoundry.com/blog/button-tutorial-photoshop/#comments</comments>
		<pubDate>Fri, 15 Oct 2010 16:29:46 +0000</pubDate>
		<dc:creator>Drew Strojny</dc:creator>
				<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://thethemefoundry.com/blog/?p=2153</guid>
		<description><![CDATA[A few months ago I re-designed all of the buttons here on The Theme Foundry website. In this tutorial I am going to walk through the button design process step-by-step. Quick Overview Application: Photoshop CS4 (CS5 should work fine as well) Difficulty: Beginner &#8211; Intermediate Estimated completion time: 15 &#8211; 20 minutes Step 1: Input [...]]]></description>
			<content:encoded><![CDATA[<!--markdown-->

<p>A few months ago I re-designed all of the buttons here on The Theme Foundry website. In this tutorial I am going to walk through the button design process step-by-step.</p>

<span id="more-2153"></span>

<h3>Quick Overview</h3>

<ul>
<li><strong>Application:</strong> Photoshop CS4 (CS5 should work fine as well)</li>
<li><strong>Difficulty:</strong> Beginner &#8211; Intermediate</li>
<li><strong>Estimated completion time:</strong> 15 &#8211; 20 minutes</li>
</ul>

<h3>Step 1: Input your button text and adjust the canvas size</h3>

<p>Create a new Photoshop document (set the background contents to <em>Transparent</em>) and enter some text for your new button. The font used in this example is <a href="http://typography.com/fonts/font_overview.php?productLineID=100033">Archer Bold</a>. If you want a free alternative check out <a href="http://new.myfonts.com/fonts/exljbris/museo/">Museo Sans 700</a>. Position the text in the center of the canvas by dragging it with the select tool and adjust the canvas size proportionately (<em>Image &rarr; Canvas Size</em>) to the size of your text.</p>

<p><img class="aligncenter" src="/wp-content/uploads/button-tutorial-photoshop/step-1.jpg" alt="Create a new Photoshop document and add your text" /></p>

<h3>Step 2: Create your button</h3>

<p>Find the rounded rectangle tool and select it. Once the rounded rectangle tool is selected you will see some options in the toolbar at the top of the Photoshop window. Change the <em>Radius</em> to 6px and set the rounded rectangle to a <em>Fixed Size</em> that matches your canvas size exactly. To create the button simply click the middle of the canvas and re-position the rounded rectangle so it is centered (it should snap into place).</p>

<p><img class="aligncenter" src="/wp-content/uploads/button-tutorial-photoshop/step-2.jpg" alt="Create a rounded rectangle" /></p>

<h3>Step 3: Add a Gradient Overlay</h3>

<p>You should now have a very plain looking rounded rectangle on top of your text. Re-arrange your layers so the text is on top of the rectangle (see image). Select the new shape from your layers panel and choose <em>Gradient Overlay</em> from the effects menu at the bottom of the layers panel. Now add a green gradient overlay by double clicking the left and right color stops one at a time (the two house shaped icons underneath the gradient bar). Set the left color stop to <em>2f9514</em> and the right color stop to <em>5bbf40</em>. The button should now have a nice gradient green overlay and is starting to take shape!</p>

<p><img class="aligncenter" src="/wp-content/uploads/button-tutorial-photoshop/step-3.jpg" alt="Add a Gradient Overlay." />
<img class="aligncenter" src="/wp-content/uploads/button-tutorial-photoshop/step-3.1.jpg" alt="Set the gradient color stops." /></p>

<h3>Step 4: Add an Inner Glow</h3>

<p>Without leaving the layer style panel check the <em>Inner Glow</em> box in the left column. In the <em>Structure</em> section set the <em>Blend Mode</em> to <em>Overlay</em>, drop the <em>Opacity</em> to 21%, and change the color to black (000000). From within the <em>Elements</em> section increase the <em>Choke</em> to 100% and reduce the <em>Size</em> to 1px. Click OK!</p>

<p><img class="aligncenter" src="/wp-content/uploads/button-tutorial-photoshop/step-4.jpg" alt="Add an inner glow." /></p>

<h3>Step 5: Duplicate, re-style, resize</h3>

<p>Duplicate the shape layer we just worked on by right clicking it in the layers panel and selecting <em>Duplicate Layer</em>. Select the new shape from the layers panel (should be called Shape 1 copy) and double click the <em>Inner Glow</em> style from the layers panel underneath the new Shape 1 copy layer. Set the color to white (ffffff) and increase the <em>Opacity</em> to 38%.</p>

<p>Click on the select arrow and then check the <em>Show Transform Controls</em> checkbox inside the toolbar at the top of the window. Now hold down <em>Command (Control on Windows) + Spacebar</em> to show the zoom tool. Use the zoom tool to drag a small box around the top-center transform handle. This will give us a close-up view of the button. Click and drag the top-center transform handle down like a window shade, revealing the original inner glow (see image below). While zoomed in scroll around the canvas and repeat this for the center-left transform handle, center-right transform handle, and center-bottom transform handle. The transform handles may be hard to find because they are sitting on the very edge of the canvas, so be sure to look closely. When finished click the checkmark in the top toolbar to commit the changes.</p>

<p><img class="aligncenter" src="/wp-content/uploads/button-tutorial-photoshop/step-5.jpg" alt="Duplicate, re-style, resize." /></p>

<h3>Step 6: Clean up the text</h3>

<p>Zoom back out by holding down <em>Command (Control on Windows) + 1</em>. Double click the text box icon (big letter T) inside the &#8220;View My Portfolio&#8221; layer in your layers panel. Use the toolbar at the top of the window to set the text color to white (ffffff) and click the checkmark to commit the changes.</p>

<p>Add a drop shadow by clicking the effects button at the bottom of the layers panel (the same button you clicked earlier when adding the gradient overlay) and choosing <em>Drop Shadow</em> from the list. Reduce the <em>Opacity</em> to 15% and reduce the <em>Distance</em> and <em>Size</em> to 1px.</p>

<p><img class="aligncenter" src="/wp-content/uploads/button-tutorial-photoshop/step-6.jpg" alt="Add a drop shadow to the text." /></p>

<h3>Step 7: Add a drop shadow to the button</h3>

<p>Select the original shape from the layers panel and and a drop shadow by clicking the effects button at the bottom of the layers panel. Set the <em>Opacity</em> to 15% and the <em>Distance</em> and <em>Size</em> to 2px. Increase the size of the canvas by 5px on each side to make room for the new drop shadow.</p>

<p><img class="aligncenter" src="/wp-content/uploads/button-tutorial-photoshop/step-7.jpg" alt="Add a drop shadow to the button." /></p>

<h3>Step 8: Save and enjoy!</h3>

<p>Save your new button for the web by choosing &#8220;Save for Web &amp; Devices&#8221; from the File menu (I recommend saving it as a 24 bit transparent PNG) and start using it on your site. If you enjoyed this tutorial or want to share some feedback drop a line in the comments.</p>

<p><strong><a href="/wp-content/uploads/button-tutorial-photoshop/photoshop-button.zip">Download the source files</a></strong></p>

<p><strong>Terms of use</strong>: You may freely use these files without restriction. No attribution or backlinks are required, but you are one cool cat if you leave a link. You are not permitted to make these files available for distribution elsewhere without prior consent.</p>
 <img src="http://thethemefoundry.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=2153" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://thethemefoundry.com/blog/button-tutorial-photoshop/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>OC WordCamp theme workshop video</title>
		<link>http://thethemefoundry.com/blog/theme-workshop-video/</link>
		<comments>http://thethemefoundry.com/blog/theme-workshop-video/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 05:46:22 +0000</pubDate>
		<dc:creator>Drew Strojny</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://thethemefoundry.com/blog/?p=1703</guid>
		<description><![CDATA[Watch the video Download the slides I presented a theme customization workshop at WordCamp Orange County earlier this year. The workshop covered 6 theme customization &#8220;best practices&#8221;. Unfortunately, the video is a bit stretched and not completely clear at times, but it still should be helpful if you are new to theme customization. New video [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://wordpress.tv/2010/04/24/drew-strojny-theme-workshop-oc10/">Watch the video</a></p>
<p><a href="/blog/wp-content/uploads/theme-workshop.pdf">Download the slides</a></p>
<p>I presented a theme customization workshop at WordCamp Orange County earlier this year. The workshop covered 6 theme customization &#8220;best practices&#8221;. Unfortunately, the video is a bit stretched and not completely clear at times, but it still should be helpful if you are new to theme customization. </p>
<p><span id="more-1703"></span></p>
<h3>New video library coming soon!</h3>
<p>I am currently working on a video tutorial library for our members. The new library will include screencasts detailing some of these best practices and how to use them effectively with our themes. Stay tuned!</p>
<p>  <img src="http://thethemefoundry.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=1703" width="1" height="1" style="display: none;" /></p>
]]></content:encoded>
			<wfw:commentRss>http://thethemefoundry.com/blog/theme-workshop-video/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How-to: Lifestream with WordPress</title>
		<link>http://thethemefoundry.com/blog/lifestream-microblog-wordpress/</link>
		<comments>http://thethemefoundry.com/blog/lifestream-microblog-wordpress/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 16:45:38 +0000</pubDate>
		<dc:creator>Drew Strojny</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[lifestreaming]]></category>
		<category><![CDATA[microblogging]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://jestro.com/?p=466</guid>
		<description><![CDATA[Are you looking to implement a lifestreaming / microblogging solution for WordPress that makes it easy to share links to interesting content along with regular blog posts? Why lifestreaming? Lifestreaming fosters a more direct, personal, and valuable relationship with your readers by making your blog more open and &#8220;real&#8221;. Your blog is your mothership and [...]]]></description>
			<content:encoded><![CDATA[<p>Are you looking to implement a <a href="http://en.wikipedia.org/wiki/Lifestreaming">lifestreaming</a> / <a href="http://en.wikipedia.org/wiki/Microblogging">microblogging</a> solution for WordPress that makes it easy to share links to interesting content along with regular blog posts?</p>
<p><span id="more-466"></span></p>
<h3>Why lifestreaming?</h3>
<p>Lifestreaming fosters a more direct, personal, and valuable relationship with your readers by making your blog more open and &#8220;real&#8221;. <a href="http://webworkerdaily.com/2009/08/22/your-blog-is-your-mothership/">Your blog is your mothership</a> and microblogging is a great way to keep your mothership unique and fresh.</p>
<h3>Can I do it with WordPress?</h3>
<p>I took a look around and there are a few plugins that provide this functionality along with a theme or two that have it built in. If you like the themes that offer this functionality then by all means go grab one of those and get microblogging! When it comes to plugins I am a big believer in home-rolling your own solution if it isn&#8217;t too hard. This has three distinct and important advantages over using a plugin:</p>
<ul>
<li><strong>Speed:</strong> Your blog uses fewer resources, staying light and quick.</li>
<li><strong>Future-proof and reliable:</strong> Fewer moving parts, less likely to break.</li>
<li><strong>Worry Free:</strong> Avoid worrying about unsupported/outdated plugins.</li>
</ul>
<p>As you can see, I think a custom solution is the clearly the best way to go. Let&#8217;s learn how to set up our lifestream inside a basic WordPress theme sans plugins.</p>
<h3>What we need</h3>
<p>The first step is to determine what new types of posts you want to include in your lifestream: photos, links, quotes, etc.  For this example we are going to use links but you can replicate this same functionality in any of the above categories.</p>
<p>Here are the two important pieces we need implement to get up and running:</p>
<ul>
<li><strong>Post Setup</strong>: Create a publish a post for our new links category.</li>
<li><strong>Presentation Layer</strong>: Present readers with a unique view of posts in our special links category.</li>
</ul>
<h3>Post Setup</h3>
<p>Below are the quick and easy steps for creating your new post:</p>
<ol>
<li>Log in to your WordPress admin panel and create a new post.</li>
<li>Add a new category called <strong>links</strong> and make sure the box is checked for that category. </li>
<li>Add a new custom field to the post by scrolling down to the <em>Custom Fields</em> section of the post editor. For the <em>Name</em> use <strong>link</strong> and for the <em>Value</em> type a test URL.</li>
</ol>
<p>Now your post is ready, go ahead and publish it. If you were following these steps for something else, like quotes or photos, name your category and custom field appropriately (eg. quotes or photos).</p>
<h3>Presentation Layer</h3>
<p>For the presentation layer we need to focus on two template files: index.php  and single.php. Open up your theme&#8217;s index.php template file and look for the loop.</p>
<pre class="prettyprint"><code>&#60;?php if (have_posts()) : ?&#62;
&#60;?php while (have_posts()) : the_post(); ?&#62;
  &#60;div &#60;?php post_class() ?&#62; id="post-&#60;?php the_ID(); ?&#62;"&#62;
    &#60;h2&#62;&#60;a href="&#60;?php the_permalink() ?&#62;" rel="bookmark" title="Permanent Link to &#60;?php the_title_attribute(); ?&#62;"&#62;&#60;?php the_title(); ?&#62;&#60;/a&#62;&#60;/h2&#62;
    &#60;small&#62;&#60;?php the_time('F jS, Y') ?&#62; &#60;!-- by &#60;?php the_author() ?&#62; --&#62;&#60;/small&#62;
    &#60;div class="entry"&#62;
      &#60;?php the_content('Read the rest of this entry &raquo;'); ?&#62;
    &#60;/div&#62;
    &#60;p class="postmetadata"&#62;&#60;?php the_tags('Tags: ', ', ', '&#60;br /&#62;'); ?&#62; Posted in &#60;?php the_category(', ') ?&#62; | &#60;?php edit_post_link('Edit', '', ' | '); ?&#62;  &#60;?php comments_popup_link('No Comments &#187;', '1 Comment &#187;', '% Comments &#187;'); ?&#62;&#60;/p&#62;
  &#60;/div&#62;
&#60;?php endwhile; ?&#62;
</code></pre>
<p>We need to tell WordPress to display our <strong>links</strong> category posts differently on our homepage. We also want to style the post title differently to indicate it is a link, not a regular blog post.  Let&#8217;s do just that by replacing line 4 (which displays the post title) with this:</p>
<pre class="prettyprint"><code>&#60;?php if ( in_category( 'links' )) : ?&#62;
  &#60;div class="link"&#62;Link&#60;/div&#62;
  &#60;h4&#62;&#60;a href="&#60;?php echo get_post_meta($post-&#62;ID, 'link', true); ?&#62;" rel="bookmark"&#62;&#60;?php the_title(); ?&#62;&#60;/a&#62;&#60;span&#62;&#60;a href="&#60;?php the_permalink() ?&#62;" rel="bookmark" title="Permanent Link to &#60;?php the_title_attribute(); ?&#62;"&#62;#&#60;/a&#62;&#60;/span&#62;&#60;/h4&#62;
&#60;?php else : ?&#62;
  &#60;h2&#62;&#60;a href="&#60;?php the_permalink() ?&#62;" rel="bookmark" title="Permanent Link to &#60;?php the_title_attribute(); ?&#62;"&#62;&#60;?php the_title(); ?&#62;&#60;/a&#62;&#60;/h2&#62;
&#60;?php endif; ?&#62;</code></pre>
<p>Below is a line-by-line breakdown of the code we just inserted.</p>
<ol>
<li>If we are in the category named links.</li>
<li>Output a basic div containing the word &#8220;link&#8221; that we can style later. This is to notify readers that this post is a link and not a regular blog post.</li>
<li>Output the link we specified in the Custom Fields section of our post and a hash (#) linking to our original post. The title of our post now links to the external link instead of the blog post itself.</li>
<li>If we are not in the category named links use this code instead.</li>
<li>Output the normal post title wrapped in a link to the original post.</li>
<li>End the If statement.</li>
</ol>
<p>We need to repeat the same process for the single.php template.</p>
<pre class="prettyprint"><code>&lt;?php if (have_posts()) : ?&gt;
&lt;?php while (have_posts()) : the_post(); ?&gt;
  &lt;h1&gt;&lt;?php the_title()?&gt;&lt;/h1&gt;
  &lt;p&gt;&lt;?php the_tags('Tags for this entry: ', ', ', '.'); ?&gt;&lt;/p&gt;
  &lt;div id="post-&lt;?php the_ID(); ?&gt;" &lt;?php post_class(); ?&gt;&gt;
    &lt;div class="entry single"&gt;
      &lt;?php the_content(); ?&gt;
    &lt;/div&gt;
    &lt;p class="postmetadata"&gt;This entry was posted by &lt;?php the_author() ?&gt; at &lt;?php the_time('g:i a') ?&gt; on &lt;?php the_time('F jS, Y') ?&gt;.&lt;/p&gt;
  &lt;/div&gt;
&lt;?php endwhile; ?&gt;
&lt;?php comments_template('', true); ?&gt;
&lt;?php else : ?&gt;
&lt;?php endif; ?&gt;</code></pre>
<p>Let&#8217;s replace the post tags (line 4) with a message to visit the external link.</p>
<pre class="prettyprint"><code>&lt;?php if ( in_category( 'links' )) : ?&gt;
  &lt;p&gt;Visit this link:&lt;br /&gt;&lt;a href="&lt;?php echo get_post_meta($post-&gt;ID, 'link', true); ?&gt;" rel="bookmark"&gt;&lt;?php echo get_post_meta($post-&gt;ID, 'link', true); ?&gt;&lt;/a&gt;
&lt;?php else : ?&gt;
  &lt;p&gt;&lt;?php the_tags('Tags for this entry: ', ', ', '.'); ?&gt;&lt;/p&gt;
&lt;?php endif; ?&gt;</code></pre>
<p>The code we just inserted will display the external link when we are in the <strong>links</strong> category and the tags for the post when we are not.</p>
<h3>Ready to rock!</h3>
<p>Now use your finely tuned CSS skills to get everything looking great and you are ready to rock!</p>
<p><strong>Bonus Tip:</strong> WordPress provides <a href="http://codex.wordpress.org/WordPress_Feeds#Categories_and_Tags">category specific feeds</a> out of the box, so why not use them? Your readers will have the option to pick and choose what part of your lifestream they want to follow. <img src="http://thethemefoundry.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=466" width="1" height="1" style="display: none;" /></p>
]]></content:encoded>
			<wfw:commentRss>http://thethemefoundry.com/blog/lifestream-microblog-wordpress/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Optimize Apache for WordPress</title>
		<link>http://thethemefoundry.com/blog/optimize-apache-wordpress/</link>
		<comments>http://thethemefoundry.com/blog/optimize-apache-wordpress/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 01:15:51 +0000</pubDate>
		<dc:creator>Drew Strojny</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[optimize]]></category>
		<category><![CDATA[vps]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.jestro.com/?p=164</guid>
		<description><![CDATA[If you made the decision to move your WordPress install from shared hosting to a shiny new VPS you should consider optimizing Apache by making some tweaks to your httpd.conf file. Apache is a fast, reliable, and flexible server but is heavy on resources by default. If you are running a small VPS, and using [...]]]></description>
			<content:encoded><![CDATA[<p>If you made the decision to move your WordPress install from shared hosting to a shiny new VPS you should consider optimizing <a href="http://httpd.apache.org/">Apache</a> by making some tweaks to your <a href="http://httpd.apache.org/docs/1.3/configuring.html">httpd.conf</a> file. Apache is a fast, reliable, and flexible server but is heavy on resources by default. If you are running a small VPS, and using it just for WordPress, you can make some small tweaks to your configuration and get some significant performance gains. </p>
<p><span id="more-164"></span></p>
<h3>Trim Down Those Modules</h3>
<p>Open up the <code>httpd.conf</code> file on your server in your favorite text editor and look for a bunch of lines starting with <code>LoadModule</code>. It should look something like this:</p>
<pre class="prettyprint"><code># Example:
# LoadModule foo_module modules/mod_foo.so
# LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_alias_module modules/mod_authn_alias.so</code></pre>
<p>The actual list will be much longer but you get the idea. You can disable these modules by &#8220;commenting them out&#8221;. Which essentially amounts to adding a <code>#</code> in front of the line like so:</p>
<pre class="prettyprint"><code># LoadModule auth_basic_module modules/mod_auth_basic.so</code></pre>
<p>You are going to disable a bunch of these modules that a basic WordPress website does not require. In fact, I want you to comment out every module <strong>EXCEPT FOR</strong> the following:</p>
<pre class="prettyprint"><code>LoadModule authz_host_module modules/mod_authz_host.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule expires_module modules/mod_expires.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule dir_module modules/mod_dir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so</code>
</pre>
<p>One of the lines you probably commented out was this one:</p>
<pre class="prettyprint"><code>LoadModule negotiation_module modules/mod_negotiation.so</code></pre>
<p>This provides some functions for auto-completing mistyped URL&#8217;s  that you don&#8217;t really need. It also is required if you are serving multilingual pages. If that is the case then <strong>DO NOT</strong> comment out the above module.</p>
<p>If you did in fact comment out the <code>mod_negotiation.so</code> module you will need to make a couple more tweaks. Find these two lines (they are in different locations) and comment them out:</p>
<pre class="prettyprint"><code>LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW</code></pre>
<pre class="prettyprint"><code>ForceLanguagePriority Prefer Fallback</code></pre>
<p>You should see a significant performance boost after disabling those modules. They were eating up a good size chunk of your limited system resources.</p>
<h3>Apache MPM Prefork Module</h3>
<p>Another handy tweak is to make some adjustments to the <a href="http://httpd.apache.org/docs/2.0/mod/prefork.html">Apache MPM prefork module</a>. This is assuming you are using Apache in prefork mode, which is highly recommended and likely if you are on a small VPS.</p>
<p>This module controls the number of processes and spare processes Apache will start and run. This is especially important if you are running a small VPS that is handling MySQL and Apache. Unless you are getting slammed with really heavy traffic on a regular basis (in which case you should be on a dedicated server) there is no need to be running the default configuration.  Find these lines in your <code>httpd.conf</code> file:</p>
<pre class="prettyprint"><code>&#60;IfModule prefork.c&#62;
StartServers       8
MinSpareServers    5
MaxSpareServers   20
ServerLimit      256
MaxClients       256
MaxRequestsPerChild  4000
&#60;/IfModule&#62;</code></pre>
<p><a href="http://httpd.apache.org/docs/2.0/mod/prefork.html#minspareservers">MinSpareservers</a> and <a href="http://httpd.apache.org/docs/2.0/mod/prefork.html#maxspareservers">MaxSpareServers</a> control the number of spare processes your webserver is permitted to run and <a href="http://httpd.apache.org/docs/2.0/mod/mpm_common.html#startservers">StartServers</a> controls how many are started by default.</p>
<p><a href="http://httpd.apache.org/docs/2.0/mod/mpm_common.html#serverlimit">ServerLimit</a> controls the maximum configured value for <a href="http://httpd.apache.org/docs/2.0/mod/mpm_common.html#maxclients">MaxClients</a>.  Reducing MaxClients on a webserver that is serving dynamic content (e.g. WordPress) can make a big difference. If you experience a traffic spike on your VPS and your MaxClients is set too high your server will more than likely get stuck in an endless loop of swapping pages from physical memory to virtual memory, commonly referred to as <a href="http://en.wikipedia.org/wiki/Thrash_(computer_science)">thrashing</a>. The accepted way of calculating an appropriate MaxClients value is dividing your total available system memory by the size per Apache process. For example,  if you had a 500MB left for Apache to use and each Apache process was using around 10MB you would set your MaxClients to (512-12) / 10 = 50. To check real time memory usage on your VPS <a href="http://articles.slicehost.com/2007/9/7/system-monitoring-with-top">use top</a>.</p>
<p><a href="http://httpd.apache.org/docs/2.0/mod/mpm_common.html#maxrequestsperchild">MaxRequestsPerChild</a> limits the number of requests a child server will handle during it&#8217;s life. We can safely reduce this value and realize a small gain.</p>
<p>So let&#8217;s go ahead and pare down those values:</p>
<pre class="prettyprint"><code>&#60;IfModule prefork.c&#62;
StartServers       3
MinSpareServers    3
MaxSpareServers   10
ServerLimit      50
MaxClients       50
MaxRequestsPerChild  2000
&#60;/IfModule&#62;</code></pre>
<p>Remember these are not concrete &#8220;best&#8221; values, they depend on the size of your VPS and how small or large you Apache process is.</p>
<h3>Optimize Your KeepAlive</h3>
<p><a href="http://httpd.apache.org/docs/2.2/mod/core.html#keepalive">KeepAlive</a> allows your visitors to issue multiple requests over the same TCP connection, in theory this helps improve latency because your visitors can request your webpage, images, and javascripts all over one connection. Unfortunately, Apache must use a worker process to service each and every request. The worker process stays busy servicing each request for a full 15 seconds by default, even if your visitor is no longer using it! This means you have less worker processes available on your system at any given time. With the limited system resources you have on your small VPS we always want open worker processes to be <strong>actually working</strong>. One way of accomplishing this is turning off <code>KeepAlive</code>. Find this line in your <code>httpd.conf</code> file:</p>
<pre class="prettyprint"><code>KeepAlive On</code></pre>
<p>and change it to:</p>
<pre class="prettyprint"><code>KeepAlive Off</code></pre>
<p>If you have a site with lots of images and javascripts it is usually better leave <code>KeepAlive</code> <strong>turned on</strong> and make some additional tweaks.</p>
<p>If you decide to leave <code>KeepAlive</code> <strong>turned on</strong> it is important you change the default <a href="http://httpd.apache.org/docs/2.0/mod/core.html#keepalivetimeout">KeepAliveTimeout</a> value. This prevents unused connections from staying open for excessive amounts of time. Find this line in your <code>httpd.conf</code> file:</p>
<pre class="prettyprint"><code>KeepAliveTimeout 15</code></pre>
<p>You want to leave this connection open for 2 seconds, just long enough for the client to request most if not all of the necessary files. So change that line to:</p>
<pre class="prettyprint"><code>KeepAliveTimeout 2</code></pre>
<p>If you are going to leave <code>KeepAlive</code> on you will want to increase <a href="http://httpd.apache.org/docs/2.0/mod/core.html#maxkeepaliverequests">MaxKeepAliveRequests</a>. Setting this higher allows more requests per connection and increases efficiency. Find this line:</p>
<pre class="prettyprint"><code>MaxKeepAliveRequests 100</code></pre>
<p>and change it to:</p>
<pre class="prettyprint"><code>MaxKeepAliveRequests 200</code></pre>
<h3>Adjust Timeout</h3>
<p>Another minor tweak that will give you a small performance boost as well as help reduce the effects of a DOS attack is changing the <a href="http://httpd.apache.org/docs/2.2/mod/core.html#timeout">TimeOut Directive</a>. This directive tells Apache how many seconds to wait while receiving an incoming request, processing it, and sending back a response. Find this line:</p>
<pre class="prettyprint"><code>Timeout 120</code></pre>
<p>and change it to:</p>
<pre class="prettyprint"><code>Timeout 40</code></pre>
<h3>Restart Apache and Enjoy!</h3>
<p>Now restart Apache and enjoy your performance boost! Always remember to backup your <code>httpd.conf</code> file in case something goes wrong. Keep in mind this is just a sample configuration and we aren&#8217;t responsible if it breaks something on your server.</p>
<h3>Additional Resources</h3>
<ul class="star-list">
<li><a href="http://www.ibm.com/developerworks/linux/library/l-tune-lamp-2.html?ca=dgr-lnxw01LAMPTuningP2">Tuning Lamp Systems, Part 2: Optimizing Apache and PHP</a></li>
<li><a href="http://httpd.apache.org/docs/1.3/misc/perf-tuning.html">Apache Performance Notes</a></li>
<li><a href="http://www.perlcode.org/tutorials/apache/tuning.html">Apache Performance Tuning</a></li>
<li><a href="http://perl.apache.org/docs/1.0/guide/performance.html#Choosing_MaxClients">Choosing MaxClients</a></li>
<li><a href="http://2bits.com/articles/tuning-the-apache-maxclients-parameter.html">Tuning the Apache MaxClients parameter</a></li>
</ul>
<p> <img src="http://thethemefoundry.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=164" width="1" height="1" style="display: none;" /></p>
]]></content:encoded>
			<wfw:commentRss>http://thethemefoundry.com/blog/optimize-apache-wordpress/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Easy Upgrading With Child Themes</title>
		<link>http://thethemefoundry.com/blog/easy-upgrading-wordpress-child-themes/</link>
		<comments>http://thethemefoundry.com/blog/easy-upgrading-wordpress-child-themes/#comments</comments>
		<pubDate>Wed, 24 Sep 2008 03:06:17 +0000</pubDate>
		<dc:creator>Drew Strojny</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[child theme]]></category>
		<category><![CDATA[upgrading]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://themes.jestro.com/vigilance/?p=386</guid>
		<description><![CDATA[A quick tutorial on using WordPress &#8220;Child Themes&#8221; to upgrade Vigilance while maintaining your custom CSS, adding custom functions, and eventually adding custom templates (WordPress 2.7) adding custom templates. Important: You will need Vigilance 1.1 or later for the child theme to work correctly. If you are running an older version of Vigilance, upgrade now. [...]]]></description>
			<content:encoded><![CDATA[<p>A quick tutorial on using WordPress &#8220;Child Themes&#8221; to upgrade Vigilance while maintaining your custom CSS, adding custom functions, and <del datetime="2009-09-18T06:08:13+00:00">eventually adding custom templates (WordPress 2.7)</del> adding custom templates.</p>
<p><span id="more-386"></span></p>
<p><strong>Important:</strong> You will need Vigilance 1.1 or later for the child theme to work correctly. If you are running an older version of Vigilance, <a href="http://themes.jestro.com/vigilance/download/">upgrade now</a>.</p>
<h2>Step 1: Download</h2>
<p>Download this basic child theme for Vigilance:</p>
<p><a href='http://themes.jestro.com/blog/wp-content/uploads/my_vigilance.zip'>Vigilance Child Theme</a></p>
<h2>Step 2: Unzip and Upload</h2>
<p>Unzip and upload this theme into your <code>wp-content/themes</code> directory just as you would any other theme.</p>
<p><strong>Note:</strong> The theme must be in it&#8217;s own directory, just like any other theme, e.g. <code>themes/my_vigilance</code></p>
<p><div id="attachment_389" class="wp-caption alignright" style="width: 150px"><img src="/wp-content/uploads/vigilance-childtheme.png" alt="Activate the Child Theme" title="Vigilance Child Theme" width="140" height="130" class="size-full wp-image-389" /><p class="wp-caption-text">Activate the Child Theme</p></div></p>
<h2>Step 3: Activate</h2>
<p>Log in to your WordPress installation and click <em>Appearance</em> then <em>Themes</em>. Find the child theme, it will look like the image on the right. Click on the theme and activate it.</p>
<h2>Step 4: Customize</h2>
<p>You can now make all of your custom CSS changes from within the child theme. Simply edit the <code>style.css</code> file. You can find it in your <code>/themes/myvigilance</code> folder. You can also add custom functions and template files. These changes will work as long as you have the child theme activated.</p>
<h2>How It Works</h2>
<p>Your new child theme inherits all of the templates and styles from the parent theme (Vigilance in this case), <strong>but</strong> any styles added in the <code>style.css</code> file in the child theme&#8217;s folder will <strong>override</strong> any default theme styles. You may also include custom <a href="http://codex.wordpress.org/Function_Reference">functions</a> by adding them to  the included <code>functions.php</code> file. <del datetime="2009-09-18T06:08:13+00:00">When <a href="http://codex.wordpress.org/Version_2.7">WordPress 2.7</a> is released you will be able to use custom templates in your child theme. </del>. You can now use custom templates in your child theme. <img src="http://thethemefoundry.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=386" width="1" height="1" style="display: none;" /></p>
]]></content:encoded>
			<wfw:commentRss>http://thethemefoundry.com/blog/easy-upgrading-wordpress-child-themes/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Recent posts in your WordPress sidebar</title>
		<link>http://thethemefoundry.com/blog/recent-posts-sidebar-wordpress/</link>
		<comments>http://thethemefoundry.com/blog/recent-posts-sidebar-wordpress/#comments</comments>
		<pubDate>Sat, 31 May 2008 16:00:27 +0000</pubDate>
		<dc:creator>Drew Strojny</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.jestro.com/?p=56</guid>
		<description><![CDATA[While developing for WordPress you sometimes need to create a &#8220;non-widgetized&#8221; custom sidebar. You would also like to have a list of your most recent posts in that custom sidebar. Unfortunately, WordPress doesn&#8217;t have a &#8220;recent posts&#8221; template tag. Here is a simple, easy to implement PHP file you can use to generate a list [...]]]></description>
			<content:encoded><![CDATA[<p>While developing for WordPress you sometimes need to create a &#8220;non-widgetized&#8221; custom sidebar. You would also like to have a list of your most recent posts in that custom sidebar. Unfortunately, WordPress doesn&#8217;t have a &#8220;recent posts&#8221; <a href="http://codex.wordpress.org/Template_Tags">template tag</a>.</p>
<p>Here is a simple, easy to implement PHP file you can use to generate a list of recent posts in your custom &#8220;non-widgetized&#8221; sidebar. </p>
<p><span id="more-56"></span></p>
<p>Download this file: <a href="/blog/wp-content/uploads/recent_posts.zip">recent_posts.php</a>. Now, upload it to the wp-content/themes/yourtheme directory, and insert the following code in your <code>sidebar.php</code> file where you want your recent posts list to appear:</p>
<p><code>&lt;?php include (TEMPLATEPATH . "/recent_posts.php"); ?&gt;</code></p>
<p>If you open up <code>recent_posts.php</code> in your favorite text editor you have the ability to change how many posts you want to display. You can also be more specific in what posts you want to display by passing different arguments to <a href="http://codex.wordpress.org/Template_Tags/query_posts">query_posts</a>. <img src="http://thethemefoundry.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=56" width="1" height="1" style="display: none;" /></p>
]]></content:encoded>
			<wfw:commentRss>http://thethemefoundry.com/blog/recent-posts-sidebar-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Convert a local WordPress XAMPP installation into a live site</title>
		<link>http://thethemefoundry.com/blog/xampp-wordpress/</link>
		<comments>http://thethemefoundry.com/blog/xampp-wordpress/#comments</comments>
		<pubDate>Tue, 17 Jul 2007 22:44:11 +0000</pubDate>
		<dc:creator>Drew Strojny</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[xampp]]></category>

		<guid isPermaLink="false">http://www.jestro.com/uncategorized/convert-local-wordpress-xampp-installation-into-live-site/</guid>
		<description><![CDATA[I recently found this quick and easy tutorial on installing XAMPP Lite locally on Windows XP. This provides a great environment for testing and developing WordPress websites from your PC. The next logical step is converting this nice local installation into a live site as quickly and easily as possible. I found some excellent instructions [...]]]></description>
			<content:encoded><![CDATA[<p>I recently found this <a href="http://geeksaresexy.blogspot.com/2006/06/installing-wordpress-locally-under.html">quick and easy tutorial</a> on installing <a href="http://www.apachefriends.org/en/xampp-windows.html">XAMPP Lite</a> locally on Windows XP. This provides a great environment for testing and developing WordPress websites from your PC. The next logical step is converting this nice local installation into a live site as quickly and easily as possible. I found some excellent instructions from <a href="http://www.tamba2.org.uk/wordpress/">The Tamba2 WordPress Guides</a>. These guides contain almost all the information used in this tutorial. I really just combined a bunch of the provided information to accomplish this specific task. I put all the instructions together here in a quick, and (hopefully) easy to follow tutorial. Let&#8217;s get started. </p>
<p><span id="more-25"></span></p>
<h3>Export Your Database</h3>
<p>First, we need to export your local XAMPP MySQL database. While XAMPP is running, navigate to <code>http://localhost/phpMyAdmin/</code>. Next, click on the database name you want to export in the menu on the left. Your database tables should be displayed and you should see some tabs running across the top. Click the <strong>export tab</strong> at the top.</p>
<p>Make sure you <strong>check the &#8220;save as file&#8221; box</strong> and then <strong>click the go button</strong> in the lower right. This will create an .sql file for us to import later. Remember where it is saved.</p>
<h3>The Import</h3>
<ol>
<li>Log in to your hosting account or your webserver and create a new MySQL database for WordPress, call it whatever you want.</li>
<li>Once you have created your new database, find PHPMyAdmin, and open it.</li>
<li>Click the name of the database you just created from the dropdown menu.</li>
<li>At the top of the screen it should say &#8220;Server: your_server(probably localhost)   Database: your_database_name&#8221;</li>
<li><strong>Click the Import Tab.</strong></li>
<li>Now click the Browse Button and browse to the location where you saved your *.sql file in the first part of the tutorial.</li>
<li><strong>Click Go at the bottom.</strong></li>
<li>You should get a message at the top stating: &#8220;Import has been successfully finished, XXX queries executed.&#8221;</li>
</ol>
<div class="attention"><strong>Important:</strong> If you are importing an extremely large database, over 5MB, you may suffer from a timeout and failed import. If this is the case you need to manually upload your data in parts. See <a href="http://www.tamba2.org.uk/wordpress/restore/">Podz detailed instructions for restoring</a> if you are having this problem.</div>
<h3>A couple quick changes</h3>
<p>Now we need to make a couple quick changes to the database. Click on the <strong>Structure tab</strong> at the top and then click the little picture in the wp-options row as seen below.</p>
<p>You should now see a list with a column showing all of the option_name values: siteurl, blogname, blogdescription, etc. You need to change two of them. The first is the very first option, <strong>siteurl</strong>. Click the little pen button on the left side of the <strong>siteurl</strong> table row. It is directly to the left of the big red X. You should now see something similar to this:</p>
<p>Type your new blog URL in the big text box. <strong>Important:</strong> Make sure you do not add a forward slash <code>/ </code> at the end of the URL.</p>
<p><strong>Click Go.</strong></p>
<p>Your <strong>siteurl</strong> row should now display your new blog URL instead of localhost or whatever IP address it was showing before.</p>
<p>Now you <strong>must repeat</strong> this same exact operation on a different option row with the option_name of <strong>home</strong>. You may have to use the pagination to view the second page of option rows to find it. It is option_id #39 on a normal WordPress install.</p>
<p>Your new database is now ready to go, exit PHPMyAdmin.</p>
<h3>Edit, Upload, and Go!</h3>
<p>Browse to your local WordPress installation.</p>
<p>Open up your <code>wp-config.php</code> file and input the MySQL details (username, password, etc.) of the new database you created in the previous step.</p>
<p>Save and close <code>wp-config.php</code>.</p>
<p>Upload the <strong>ENTIRE</strong> contents of your local WordPress folder to the new location on your webserver. This new location <del datetime="2006-07-17T21:33:41+00:00">should</del> <strong>must</strong> be the same one you used in the first part of this tutorial when changing the <strong>siteurl</strong> and <strong>home</strong> values in phpMyAdmin. This is important. If the locations are different, it will not work.</p>
<p>Your done, navigate to your new &#8220;live&#8221; WordPress powered website and enjoy.</p>
<div class="notice"><strong>Note:</strong> If you want to continue using your local installation you can keep your updated <code>wp_config.php</code> file and add the following lines of code to your local version of the file(this will override the two option values we changed earlier in phpMyAdmin):</div>
<pre class="prettyprint"><code>//*Set Path
define('WP_HOME', 'http://localhost' );
define('WP_SITEURL', 'http://localhost');</code></pre>
<p> <img src="http://thethemefoundry.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=25" width="1" height="1" style="display: none;" /></p>
]]></content:encoded>
			<wfw:commentRss>http://thethemefoundry.com/blog/xampp-wordpress/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Convert HTML to WordPress</title>
		<link>http://thethemefoundry.com/blog/html-wordpress/</link>
		<comments>http://thethemefoundry.com/blog/html-wordpress/#comments</comments>
		<pubDate>Tue, 09 May 2006 00:44:45 +0000</pubDate>
		<dc:creator>Drew Strojny</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://www.jestro.com/uncategorized/convert-xhtml-css-to-wordpress/</guid>
		<description><![CDATA[Updated February 2012 and now compatible with WordPress 3.3 + When I first decided to convert a static HTML design to WordPress I did some searching for a tutorial to help me get started with the basics. Surprisingly, I didn&#8217;t find anything that was very complete or easy to follow. For that reason I decided [...]]]></description>
			<content:encoded><![CDATA[<div class="success"><strong>Updated February 2012</strong> and now compatible with WordPress 3.3 +</div>

<p>When I first decided to convert a static HTML design to WordPress I did some searching for a tutorial to help me get started with the basics. Surprisingly, I didn&#8217;t find anything that was very complete or easy to follow. For that reason I decided to write a very basic tutorial on how to convert a static HTML template into a <a href="http://codex.wordpress.org/Theme_Development">WordPress Theme</a>. If you are an absolute beginner at developing WordPress themes then this should help you get started. This tutorial assumes you already have a basic understanding of HTML and CSS. It also assumes you have a website built in HTML and CSS and have it ready for conversion.</p>

<span id="more-22"></span>

<h3>How WordPress Works</h3>

<p>WordPress works in a rather straightforward manner but it may seem confusing if you are completely new to the concept. WordPress relies on PHP to <strong>call on</strong> different parts of your content from the <a href="http://en.wikipedia.org/wiki/DBMS">database management system</a> it stands on. For example, look in your <code>/wp-content/themes/twentyten/</code> directory and open the <code>header.php</code> file. As you scroll through the code notice the PHP calls, they start with a <code>&lt;?php</code> and end with a <code>?&gt;</code>. Look at line 37 and notice the call for your stylesheet URL:</p>

<pre><code>&lt;link rel="stylesheet" type="text/css" media="all" href="&lt;?php bloginfo( 'stylesheet_url' ); ?&gt;" /&gt;
</code></pre>

<p>This line uses PHP to look-up your stylesheet&#8217;s location from the database. This basic function of <strong>retrieving</strong> or <strong>calling</strong> some kind of data from your database and using PHP to display it in your HTML is how WordPress works. Throughout this process you will be <strong>substituting</strong> PHP for different parts of your content and your code. This will make editing easier in the long run, as you will find out. Now that you understand the basics of how WordPress works, lets get started.</p>

<h3>First Things First</h3>

<p>The first step is to create a new folder and name it whatever you want your theme to be called. Next, create two new files, <code>style.css</code> and <code>index.php</code> and place them in the folder. Believe it or not, these are the only two files you actually need for a WordPress theme. Now copy and paste the code from your original CSS file into the <code>style.css</code> file you just created. At the top add the following code:</p>

<pre><code>/*
Theme Name: Replace with your Theme's name.
Theme URI: Your Theme's URI
Description: A brief description.
Version: 1.0
Author: You
Author URI: Your website address.
*/
</code></pre>

<p>These comments simply help WordPress properly identify the theme. Your stylesheet is now ready to go.</p>

<h3>Chop It Up</h3>

<p>Now let&#8217;s start chopping up your HTML. Remember how we talked about WordPress using PHP to call data from your database? Well WordPress can also use PHP to call different files from within your template folder. Imagine your current HTML code chopped up into 4 (or more) different sections. For example, take a look at the layout and corresponding HTML of this page. The header comes first, followed by the content, then the sidebar, and finally the footer. Instead of keeping these 4 parts of the HTML together in one file, you are going to put each of them in their own separate file. Then call on them one by one using PHP.</p>

<p>So go ahead and sort through your HTML code and place some markers in the 4 places where you plan on cutting the code into 4 separate sections.</p>

<div class="attention">These next steps assume you have your page set up left to right: header, content, sidebar, footer. If your page is ordered differently you will have to switch a couple of these steps around.</div>

<p>Now create 3 new files (<code>header.php</code>, <code>sidebar.php</code>, <code>footer.php</code>) and place them in your theme directory. Next take a look at the <code>header.php</code> file from the Twenty Ten theme we looked at earlier.  Notice all the PHP that is used in between the <code>&lt;head&gt;</code> tags. Copy that code to your new <code>header.php</code> file. Now open up your original HTML file and copy the code you marked off for your header (1st section) into your new <code>header.php</code> file (underneath the <code>&lt;head&gt;</code></code> section). Save and close.</p>

<p>Now open up your new <code>index.php</code> file. Copy the second part of your original HTML code, the content (2nd section) into your new <code>index.php</code> file. Save and close.</p>

<p>Getting the hang of it?</p>

<p>Next open up your new <code>sidebar.php</code> file, copy the sidebar (3rd section) of your original code into the <code>sidebar.php</code> file. Finally, copy the original footer (4th section) of code into your new <code>footer.php</code> file.</p>

<h3>Put It Back Together</h3>

<p>Your original code should now be chopped up into 4 different files (<code>header.php, index.php, sidebar.php, footer.php</code>). Let's put it back together using a few lines of PHP. Open up your <code>index.php</code> file, it should contain the HTML from the content (2nd section) of your original code.  Add this line at the very top of the file:</p>

<pre><code>&lt;?php get_header(); ?&gt;
</code></pre>

<p>Now go to the absolute bottom of your <code>index.php</code> file and add these two lines:</p>

<pre><code>&lt;?php get_sidebar(); ?&gt;
&lt;?php get_footer(); ?&gt;
</code></pre>

<p>These 3 simple lines of PHP are telling WordPress to fetch and display your <code>header.php</code>, <code>sidebar.php</code>, and <code>footer.php</code> files within your <code>index.php</code> file. <strong>Your code is now officially put back together.</strong> Now, if you want to edit your sidebar you can just edit your <code>sidebar.php</code> file, instead of sorting through your <code>index.php</code> to find it. The same goes for your <code>header.php</code> and your <code>footer.php</code>.</p>

<h3>The Loop</h3>

<p>Your <code>index.php</code> is almost finished. The final step is to insert the actual content into the code. Luckily, WordPress uses PHP for this as well. <a href="http://codex.wordpress.org/The_Loop">The Loop</a> is the PHP function WordPress uses to call and display your posts from the database they are saved in. Grab this code and paste it into your new theme's <code>index.php</code> file (inside of whichever <code>div</code> you are using to hold your content).</p>

<pre><code>&lt;?php if ( have_posts() ) : ?&gt;
&lt;?php while ( have_posts() ) : the_post(); ?&gt;
  &lt;div id="post-&lt;?php the_ID(); ?&gt;" &lt;?php post_class(); ?&gt;&gt;
    &lt;div class="post-header"&gt;
        &lt;div class="date"&gt;&lt;?php the_time( 'M j y' ); ?&gt;&lt;/div&gt;
        &lt;h2&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;" rel="bookmark" title="Permanent Link to &lt;?php the_title_attribute(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;
        &lt;div class="author"&gt;&lt;?php the_author(); ?&gt;&lt;/div&gt;
    &lt;/div&gt;&lt;!--end post header--&gt;
    &lt;div class="entry clear"&gt;
        &lt;?php if ( function_exists( 'add_theme_support' ) ) the_post_thumbnail(); ?&gt;
        &lt;?php the_content(); ?&gt;
        &lt;?php edit_post_link(); ?&gt;
        &lt;?php wp_link_pages(); ?&gt;
    &lt;/div&gt;&lt;!--end entry--&gt;
    &lt;div class="post-footer"&gt;
        &lt;div class="comments"&gt;&lt;?php comments_popup_link( 'Leave a Comment', '1 Comment', '% Comments' ); ?&gt;&lt;/div&gt;
    &lt;/div&gt;&lt;!--end post footer--&gt;
  &lt;/div&gt;&lt;!--end post--&gt;
&lt;?php endwhile; /* rewind or continue if all posts have been fetched */ ?&gt;
  &lt;div class="navigation index"&gt;
    &lt;div class="alignleft"&gt;&lt;?php next_posts_link( 'Older Entries' ); ?&gt;&lt;/div&gt;
    &lt;div class="alignright"&gt;&lt;?php previous_posts_link( 'Newer Entries' ); ?&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;!--end navigation--&gt;
&lt;?php else : ?&gt;
&lt;?php endif; ?&gt;
</code></pre>

<p>You just inserted a basic version of the loop into your code! WordPress will use the loop to display your posts and comments on your website.</p>

<h3>The End</h3>

<p>Now upload your theme folder to <code>/wp-content/themes/</code>. Then log into WordPress and activate your theme. Wasn't that easy?</p>

<p>This tutorial covered the basics for converting your theme to WordPress. To further customize and enhance your theme start looking at the <a href="http://codex.wordpress.org/Main_Page">WordPress Codex</a>, specifically <a href="http://codex.wordpress.org/Template_Tags">Template Tags</a> and <a href="http://codex.wordpress.org/Templates">Template Files</a>. You can use template tags in your sidebar, in your header, or your footer to call menus, categories, posts, etc. As you learn more about template tags and template files you will discover the endless possibilities for customizing your new WordPress blog.</p>
 <img src="http://thethemefoundry.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=22" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://thethemefoundry.com/blog/html-wordpress/feed/</wfw:commentRss>
		<slash:comments>39</slash:comments>
		</item>
	</channel>
</rss>

