<?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/"
	xmlns:series="http://unfoldingneurons.com/"
	>

<channel>
	<title>Pressing Pixels &#187; Development</title>
	<atom:link href="http://pressingpixels.com/category/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://pressingpixels.com</link>
	<description>WordPress Resources &#38; More</description>
	<lastBuildDate>Mon, 02 Nov 2009 22:50:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9-rare</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Categorize Search Results in Wordpress</title>
		<link>http://pressingpixels.com/categorize-search-results-in-wordpress/</link>
		<comments>http://pressingpixels.com/categorize-search-results-in-wordpress/#comments</comments>
		<pubDate>Thu, 22 May 2008 17:41:01 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[categories]]></category>
		<category><![CDATA[conditional]]></category>
		<category><![CDATA[customize]]></category>
		<category><![CDATA[loop]]></category>
		<category><![CDATA[results]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[tags]]></category>

		<guid isPermaLink="false">http://pressingpixels.com/categorize-search-results-in-wordpress/</guid>
		<description><![CDATA[I&#8217;ve always thought that search results pages could be done better.  It would be nice to present the data the user wants in a pleasing fashion.  In a blog situation or pretty much any situation where the majority of your content is categorized and or tagged, you can very easily present your user [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve always thought that search results pages could be done better.  It would be nice to present the data the user wants in a pleasing fashion.  In a blog situation or pretty much any situation where the majority of your content is categorized and or tagged, you can very easily present your user a very organized search result based on specific categories and tags.</p>
<p>The theory behind this is simple really.  We&#8217;re just going to take some common WordPress logic and apply it to our scenario.</p>
<p>For example, if you were to happen to write a blog about developing with WordPress and most of your articles were focused on plugins and themes it would make sense that the majority of searches done on your site would be for content that related to those categories.  So why not present the user with the results from those categories specifically at the top of the search results?</p>
<p>Now, as far as I can tell you can&#8217;t just use conditional tags like you would in your sidebar or header like I referenced in my <a href="http://pressingpixels.com/custom-headers-for-different-pages-in-wordpress/">previous article on custom headers</a>.<br />
In those example you get to choose what content to query and display.  With search you don&#8217;t know what is specifically being queried, unless your name is <a href="http://en.wikipedia.org/wiki/Carnac_the_Magnificent">Carnac the Magnificent</a>&#8230;  </p>
<p>So the solution is to use multiple loops.  If you need to brush up on what the <a href="http://codex.wordpress.org/The_Loop">WordPress loop is you can read more here</a>.</p>
<p>Back to our blog scenario. Here is what we want to do. When somebody searches my site I want to present my users with any results from the plugin and theme categories first and then give them the rest of the search results.</p>
<p>So start off with your normal loop.</p>
<pre>
<code>&lt;?php if (have_posts()) : ?&gt; &lt;?php while (have_posts()) : the_post(); ?&gt;</code>
</pre>
<p>Next we&#8217;ll check to see if the user&#8217;s search query returned anything from our plugin category.  The number represents the plugin&#8217;s id.  You can find this out by going to manage>categories in your WP admin, either hover over the category name in the list and look at the bottom of your browser or click to edit a category and look at the end of the url in your address bar &#8211; that is the category id.</p>
<pre>
<code>&lt;?php if ( in_category('7') ): ?&gt;</code>
</pre>
<p>At this point you can put in whatever you want to display to the user whether its the title or the post, the excerpt, or the full content.  For simplicities sake I&#8217;m just going to display the title with a link to its permalink.</p>
<pre>
<code>&lt;a href="&lt;?php the_permalink() ?&gt;"&gt;&lt;?php the_title() ?&gt;&lt;/a&gt;</code>
</pre>
<p>Now close out the if statement for your condition.</p>
<pre>
<code>&lt;?php endif; ?&gt;</code>
</pre>
<p>And close out the first loop.</p>
<pre>
<code>&lt;?php endwhile;  ?&gt;
&lt;?php endif; ?&gt; </code>
</pre>
<p>Now lets check to see if there are posts returned from the search in the themes category.</p>
<p>We are going to use another loop but in order to get the same set of results from the user&#8217;s search query we need to &#8220;rewind the posts.&#8221;  This function allows us to use the same query over again.  Here is the code.</p>
<pre>
<code>&lt;?php rewind_posts(); ?&gt;</code>
</pre>
<p>And now we just enter the same code for our loop with the conditional category.</p>
<pre>
<code>&lt;?php while (have_posts()) : the_post(); ?&gt;
    &lt;?php if ( in_category('17') ): ?&gt;
        &lt;a href="&lt;?php the_permalink() ?&gt;"&gt;&lt;?php the_title() ?&gt;&lt;/a&gt;
    &lt;?php endif; ?&gt;
&lt;?php endwhile; ?&gt;</code>
</pre>
<p>If you have additional categories you would like to feature just repeat.</p>
<pre>
<code>&lt;?php rewind_posts(); ?&gt;

&lt;?php while (have_posts()) : the_post(); ?&gt;
    &lt;?php if ( in_category('17') ): ?&gt;
        &lt;a href="&lt;?php the_permalink() ?&gt;"&gt;&lt;?php the_title() ?&gt;&lt;/a&gt;
    &lt;?php endif; ?&gt;
&lt;?php endwhile; ?&gt;</code>
</pre>
<p>Once you are done featuring categories of search results you will probably want to give the user the results that do not fit into your organized categories.  We&#8217;ll do this by once again rewinding our posts but don&#8217;t want to include the results we already have so we need to exclude the categories we featured.  The condition we are using checks to see if any posts are in a category and if they are they are skipped the query continues. Here is what the code looks like.</p>
<pre>
<code>&lt;?php rewind_posts(); ?&gt;

&lt;?php while (have_posts()) : the_post(); ?&gt;
   &lt;?php if (in_category('7')) continue; ?&gt;
   &lt;?php if (in_category('17')) continue; ?&gt;
        &lt;a href="&lt;?php the_permalink() ?&gt;"&gt;&lt;?php the_title() ?&gt;&lt;/a&gt;
&lt;?php endwhile; ?&gt;</code>
</pre>
<p>Here is the entire thing.  I also put in some headings to seperate the content &#8211; though you don&#8217;t need to do that.</p>
<pre>
<code>&lt;h3&gt;Plugins&lt;/h3&gt;

    &lt;?php if (have_posts()) : ?&gt; &lt;?php while (have_posts()) : the_post(); ?&gt;
        &lt;?php if ( in_category('7') ): ?&gt;
            &lt;a href="&lt;?php the_permalink() ?&gt;"&gt;&lt;?php the_title() ?&gt;&lt;/a&gt;
        &lt;?php endif; ?&gt;					

    &lt;?php endwhile;  ?&gt;
    &lt;?php endif; ?&gt;   

&lt;h3&gt;Themes&lt;/h3&gt;

    &lt;?php rewind_posts(); ?&gt;
        &lt;?php while (have_posts()) : the_post(); ?&gt;
            &lt;?php if ( in_category('17') ): ?&gt;
                &lt;a href="&lt;?php the_permalink() ?&gt;"&gt;&lt;?php the_title() ?&gt;&lt;/a&gt;
            &lt;?php endif; ?&gt;
        &lt;?php endwhile; ?&gt;

&lt;h3&gt;Other Results&lt;/h3&gt;

    &lt;?php rewind_posts(); ?&gt;
        &lt;?php while (have_posts()) : the_post(); ?&gt;
            &lt;?php if (in_category('7')) continue; ?&gt;
            &lt;?php if (in_category('17')) continue; ?&gt;
                &lt;a href="&lt;?php the_permalink() ?&gt;"&gt;&lt;?php the_title() ?&gt;&lt;/a&gt;
       &lt;?php endwhile; ?&gt;</code>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://pressingpixels.com/categorize-search-results-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Custom Headers For Different Pages</title>
		<link>http://pressingpixels.com/custom-headers-for-different-pages-in-wordpress/</link>
		<comments>http://pressingpixels.com/custom-headers-for-different-pages-in-wordpress/#comments</comments>
		<pubDate>Thu, 01 May 2008 16:07:14 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[conditional tags]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[else]]></category>
		<category><![CDATA[header]]></category>
		<category><![CDATA[if]]></category>
		<category><![CDATA[page]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://pressingpixels.com/custom-headers-for-different-pages-in-wordpress/</guid>
		<description><![CDATA[This entry is part 1 of 1 in the series WordPress Conditional Tags For DummiesThis article will begin a series of articles showing practical and real world examples on how to use conditional tags within WordPress.
So for starters let&#8217;s review what exactly a &#8220;conditional tag&#8221; is.  According to the WordPress Codex:
Conditional Tags can be [...]]]></description>
			<content:encoded><![CDATA[<div class="seriesmeta">This entry is part 1 of 1 in the series <a href="http://pressingpixels.com/series/wordpress-conditional-tags-for-dummies/" title="series-61">WordPress Conditional Tags For Dummies</a></div><p>This article will begin a series of articles showing practical and real world examples on how to use conditional tags within WordPress.</p>
<p>So for starters let&#8217;s review what exactly a &#8220;conditional tag&#8221; is.  According to the WordPress Codex:</p>
<blockquote><p>Conditional Tags can be used in your template files to change what content is displayed and how that content is displayed on a particular page depending on what conditions that page matches. For example, you might want to display a snippet of text above the series of posts, but only on the main page of your blog.</p></blockquote>
<p>So basically WordPress has built in a system of tags that checks your code for specific conditions.  If a condition come back as &#8220;true&#8221; one thing happens, if it comes back as &#8220;false&#8221; something else happens.</p>
<p>In today&#8217;s article we are going to work on a site to allow the home page to have a unique header from the rest of the pages.  You can see the article in action on the <a href="http://example.pressingpixels.com">Pressing Pixels demo site</a>.</p>
<p>The demo site we&#8217;ll be working with is using the theme &#8220;The Morning After&#8221; which is a brilliant free magazine style theme from Arun Kale.  <a href="http://themasterplan.in/themes/the-morning-after/">You can download it here.</a></p>
<p>In you look at the Morning After theme on Arun&#8217;s site you&#8217;ll notice that the theme has a standard sized header logo and image header for every page. I would like to have a larger and unique logo on my home page that is different than all the rest of the pages.</p>
<p>I won&#8217;t go into great detail but I had to do some work initially in the template styles and layout to make my images fit.  This will obviously be different for each theme you are working with and is not critical to fulfill the purpose of this article.</p>
<ul>
<li>I removed the &#8220;top banner&#8221; div from the home page and page templates</li>
<li>I moved the &#8220;page title template tag&#8221; into the body of the page template</li>
<li>I floated the right column right and the left column left.  I also had to move the right column div in front of the left in the home page template so that it would flow correctly</li>
</ul>
<p>With that done all that was left was to add in the conditions that would determine which logo went to which page.</p>
<p>Here is the code in its entirety (If you&#8217;re looking at the source code on the demo page you&#8217;ll notice I&#8217;ve removed a few of the custom style classes here to make the example cleaner).  We&#8217;ll break it down in second.</p>
<pre>
<code><span style="color:red">&lt;?php</span> <span style="color:green">if</span> (is_home() ) { <span style="color:red">?&gt;</span>

<span style="color:blue">&lt;div id="logo_home"&gt;</span>
     <span style="color:green">&lt;a href=</span>"<span style="color:red">&lt;?php</span> bloginfo(<span style="color:red">'url'</span>); <span style="color:red">?&gt;</span>"&gt;
      <span style="color:purple">&lt;img src=</span>"<span style="color:red">&lt;?php</span> bloginfo(<span style="color:red">'template_url'</span>); <span style="color:red">?&gt;</span><span style="color:blue">/images/logo.jpg"</span> <span style="color:purple">/&gt;</span><span style="color:green">&lt;/a&gt;</span>
<span style="color:blue">&lt;/div&gt;</span>

<span style="color:red">&lt;?php</span> } <span style="color:green">else<span> <span style="color:red">{ ?&gt;</span>

<span style="color:blue">&lt;div id="logo_other"&gt;</span>
     <span style="color:green">&lt;a href=</span>"<span style="color:red">&lt;?php</span> bloginfo(<span style="color:red">'url'</span>); <span style="color:red">?&gt;</span>"&gt;
      <span style="color:purple">&lt;img src=</span>"<span style="color:red">&lt;?php</span> bloginfo(<span style="color:red">'template_url'</span>); <span style="color:red">?&gt;</span><span style="color:blue">/images/logo2.png"</span> <span style="color:purple">/&gt;</span><span style="color:green">&lt;/a&gt;</span>
<span style="color:blue">&lt;/div&gt;</span>

<span style="color:red">&lt;?php</span> } <span style="color:red">?&gt;</span></code>
</pre>
<p>Okay, lets break it down.</p>
<p>In the header.php file I started out with the simple conditional tag &#8220;is_home&#8221;.  </p>
<pre><code class="php">&lt;?php if(is_home() ) { ?&gt;</code></pre>
<p>This particular tag checks to see if the page is the &#8220;home&#8221; page.  </p>
<p>The home page can be defined in a few different ways.  If you have a standard installation and have not changed any settings.  The home page is your blog address (URL) as defined in your WordPress general settings.  You can change this in the reading settings to set the &#8220;front&#8221; or &#8220;home page&#8221; to be something different.  </p>
<p>Whatever your particular case, the &#8220;is_home&#8221; tag refers to this page.</p>
<p>Notice that the tag includes &#8220;if&#8221;.  This is the piece that tells WordPress to look out, because it has some options to choose from.<br />
Also notice that the code ends with an opening brace.</p>
<pre><code> {</code></pre>
<p>The conditions fit inside of these braces.  Every condition you create (and you can create multiple which we&#8217;ll discuss in a later article) must be inside opening and closing braces.</p>
<p>So once we&#8217;ve checked to see if this is the home page we can enter the code for what we want to happen if that condition is true.  In this case, if our user is on the home page I want them to see a little larger logo.  So lets stick that in the code.</p>
<pre>
<code><span style="color:blue">&lt;div id="logo_home"&gt;</span>
     <span style="color:green">&lt;a href=</span>"<span style="color:red">&lt;?php</span> bloginfo(<span style="color:red">'url'</span>); <span style="color:red">?&gt;</span>"&gt;
      <span style="color:purple">&lt;img src=</span>"<span style="color:red">&lt;?php</span> bloginfo(<span style="color:red">'template_url'</span>); <span style="color:red">?&gt;</span><span style="color:blue">/images/logo.jpg"</span> <span style="color:purple">/&gt;</span><span style="color:green">&lt;/a&gt;</span>
<span style="color:blue">&lt;/div&gt;</span></code>
</pre>
<p>Now since we&#8217;ve checked to see if the condition is true (whether or not we&#8217;re on the home page) we need to define what happens if the condition is false.  We do that by using &#8220;else&#8221;.  Here is the code and notice the closing and opening of the braces.</p>
<pre>
<code><span style="color:red">&lt;?php</span> } <span style="color:green">else</span> { <span style="color:red">?&gt;</span></code>
</pre>
<p>The next step is to put in the code for what we want to happen if we are not on the home page.  And since we have not defined any additional conditions this next snippet of code will appear on every page that is not the home page.</p>
<pre>
<code><span style="color:blue">&lt;div id="logo_other"&gt;</span>
     <span style="color:green">&lt;a href=</span>"<span style="color:red">&lt;?php</span> bloginfo(<span style="color:red">'url'</span>); <span style="color:red">?&gt;</span>"&gt;
      <span style="color:purple">&lt;img src=</span>"<span style="color:red">&lt;?php</span> bloginfo(<span style="color:red">'template_url'</span>); <span style="color:red">?&gt;</span><span style="color:blue">/images/logo2.png"</span> <span style="color:purple">/&gt;</span><span style="color:green">&lt;/a&gt;</span>
<span style="color:blue">&lt;/div&gt;</span></code>
</pre>
<p>The only differences are the id of the container div and the name of the logo file.  I had to give them different div id&#8217;s because the heights of the respective logos were different and I wanted to define that in my style sheet.</p>
<p>The very last thing we need to do, and this is a step often forgotten is to close out our last condition with a closing curly brace.</p>
<pre>
<code><span style="color:red">&lt;?php</span> } <span style="color:red">?&gt;</span></code>
</pre>
<p>And that&#8217;s it.  This technique obviously does not just apply to header logos but with anything you would like to do uniquely on the home page.</p>
<p>The next article in the series will cover how to use multiple conditions.</p>
]]></content:encoded>
			<wfw:commentRss>http://pressingpixels.com/custom-headers-for-different-pages-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<series:name><![CDATA[WordPress Conditional Tags For Dummies]]></series:name>
	</item>
		<item>
		<title>How to Relate Pages in WordPress</title>
		<link>http://pressingpixels.com/how-to-relate-pages-in-wordpress/</link>
		<comments>http://pressingpixels.com/how-to-relate-pages-in-wordpress/#comments</comments>
		<pubDate>Thu, 24 Apr 2008 16:46:32 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[loop]]></category>
		<category><![CDATA[pages]]></category>
		<category><![CDATA[post timages]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[relate pages]]></category>
		<category><![CDATA[tags]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[template tags]]></category>

		<guid isPermaLink="false">http://pressingpixels.com/how-to-relate-pages-in-wordpress/</guid>
		<description><![CDATA[A recent client project left me with perplexing problem.  I needed to be able to relate pages to one another.
My end goal was to have a product page that would display thumbnails of related accessories with links to those accessories.
The solution I choose was to use tags.  Tags?  I didn&#8217;t know you [...]]]></description>
			<content:encoded><![CDATA[<p>A recent client project left me with perplexing problem.  I needed to be able to relate pages to one another.</p>
<p>My end goal was to have a product page that would display thumbnails of related accessories with links to those accessories.</p>
<p>The solution I choose was to use tags.  Tags?  I didn&#8217;t know you could tag pages?  Well, out of the box you can&#8217;t, (not sure why) but there is a decent plugin called &#8220;<a href="http://www.michelem.org/wordpress-plugin-tags4page/">tags4pages</a>&#8221; that will add the tagging field to pages.</p>
<p>With that plugin installed all I have to do is go into an accessory page and in the tags section put the title of the product page the accessory should be related to.  The cool thing about using tags is that I can relate this accessory to as many products as I need to.  It is also very easy to disassociate an accessory &#8211; just delete the tag!</p>
<p>Now, I admit there are probably easier ways of doing this but it worked for me. Use the logic below at your own risk&#8230;</p>
<p>So now comes the fun part.  How in the world can I wrangle the code to display only the accessories with tag&#8217;s that match my main product&#8217;s title?</p>
<p>I&#8217;m working in the default &#8216;page&#8217; template in my WordPress theme but this would work for any page template.</p>
<p>Make sure you are not working in the current page&#8217;s loop.  Look for this code and start after it:</p>
<pre><code><span style="color:red">&lt;?php</span> <span style="color:green">endwhile</span>; <span style="color:green">endif</span>; <span style="color:red">?&gt;</span></code></pre>
<p>We need to get the title of the current page.</p>
<pre><code><span style="color:red">&lt;?php</span> $tag <span style="color:blue">=</span> get_the_title(); <span style="color:red">?&gt;</span></code></pre>
<p>Notice that you need to put &#8216;get_&#8217; before the WP title tag.  This allows you to put the page title in a variable &#8211; otherwise it would just print it on the page.</p>
<p>Next, we need to query our posts to come back with the appropriate pages (in our case all the pages that have the tag of our title).</p>
<pre>
<code><span style="color:red">&lt;?php</span> query_posts(<span style="color:red">"showposts=5&amp;tag=$tag"</span>); <span style="color:red">?&gt;</span></code>
</pre>
<p>This is the code written in English.<br />
&#8220;Please (its always good to be polite&#8230;) show me the five most recent posts or pages that have the tag I defined in my previous code snippet.&#8221;</p>
<p>That gets us our pages now we have to display them.  In my case I just want to display thumbnails with a link to the accessory page.  I&#8217;ve chosen an easy route to get the thumbnails and in this example they are not explicitly tied into the WP database (in other words, I&#8217;m cheating&#8230;).</p>
<p>I have a folder of images inside my main template folder where every image has the same name of its product page.</p>
<p>Let&#8217;s get our loop going.</p>
<pre>
<code><span style="color:red">&lt;?php</span> <span style="color:green">if</span> (have_posts()) <span style="color:blue">:</span> <span style="color:green">while</span> (have_posts()) <span style="color:blue">:</span> the_post(); <span style="color:red">?&gt;</span></code>
</pre>
<p>Now lets grab the image thumbnail and link it.</p>
<pre>
<code><span style="color:green">&lt;a href=</span><span style="color:blue">"</span><span style="color:red">&lt;?php</span> the_permalink() <span style="color:red">?&gt;</span>"&gt;
<span style="color:purple">&lt;img src=</span><span style="color:blue">"</span><span style="color:red">&lt;?php</span> bloginfo(<span style="color:red">'template_url'</span>); <span style="color:red">?</span>&gt;<span style="color:blue">/images/accessory_thumbs/</span>
<span style="color:red">&lt;?php</span> the_title() <span style="color:red">?&gt;</span><span style="color:blue">.jpg"</span> <span style="color:purple">alt=</span><span style="color:blue">"</span><span style="color:red">&lt;?php</span> the_title() <span style="color:red">?&gt;</span>"
<span style="color:purple">title=</span><span style="color:blue">"</span><span style="color:red">&lt;?php</span> $image_title = get_post_meta($post-&gt;ID, <span style="color:red">"image_title"</span>,
$single = <span style="color:green">true</span>); <span style="color:blue">echo</span> $image_title;<span style="color:red">?&gt;</span>" /&gt;<span style="color:green">&lt;/a&gt;</span></code>
</pre>
<p>Here is the code explanation:<br />
I&#8217;m grabbing the image from the &#8220;accessory_thumbs&#8221; folder which is in my current template folder (hence the &#8220;template_url&#8221;).  The actual file name is the same as the title of the page so I can use the WP template tag to get this.  I&#8217;m also using the title template tag as my alternate text.</p>
<p>The last thing I&#8217;m doing is putting a title on the image so that when someone rolls over the thumbnail a little context box pops up to let them know what this accessory is.  I&#8217;ve done this using a custom field.  On the accessory page I&#8217;ve created a custom field called &#8220;image_title&#8221; with a short product description.  The code you see above is getting the custom field &#8220;image_title&#8221; from the current post and displaying it.</p>
<p>End your loop and you are good to go!</p>
<p>Here is the full code snippet.</p>
<pre>
<code><span style="color:red">&lt;?php</span> $tag <span style="color:blue">=</span> get_the_title(); <span style="color:red">?&gt;</span>

<span style="color:red">&lt;?php</span> query_posts(<span style="color:red">"showposts=5&amp;tag=$tag"</span>); <span style="color:red">?&gt;</span>

<span style="color:red">&lt;?php</span> <span style="color:green">if</span> (have_posts()) <span style="color:blue">:</span> <span style="color:green">while</span> (have_posts()) <span style="color:blue">:</span> the_post(); <span style="color:red">?&gt;</span>

<span style="color:green">&lt;a href=</span><span style="color:blue">"</span><span style="color:red">&lt;?php</span> the_permalink() <span style="color:red">?&gt;</span>"&gt;
<span style="color:purple">&lt;img src=</span><span style="color:blue">"</span><span style="color:red">&lt;?php</span> bloginfo(<span style="color:red">'template_url'</span>); <span style="color:red">?</span>&gt;<span style="color:blue">/images/accessory_thumbs/</span>
<span style="color:red">&lt;?php</span> the_title() <span style="color:red">?&gt;</span><span style="color:blue">.jpg"</span> <span style="color:purple">alt=</span><span style="color:blue">"</span><span style="color:red">&lt;?php</span> the_title() <span style="color:red">?&gt;</span>"
<span style="color:purple">title=</span><span style="color:blue">"</span><span style="color:red">&lt;?php</span> $image_title = get_post_meta($post-&gt;ID, <span style="color:red">"image_title"</span>,
$single = <span style="color:green">true</span>); <span style="color:blue">echo</span> $image_title;<span style="color:red">?&gt;</span>" /&gt;<span style="color:green">&lt;/a&gt;</span>

<span style="color:red">&lt;?php</span> <span style="color:green">endwhile</span>; <span style="color:green">endif</span>; <span style="color:red">?&gt;</span></code>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://pressingpixels.com/how-to-relate-pages-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>10 Plugins To Use In Wordpress Development</title>
		<link>http://pressingpixels.com/10-plugins-to-use-in-wordpress-development/</link>
		<comments>http://pressingpixels.com/10-plugins-to-use-in-wordpress-development/#comments</comments>
		<pubDate>Mon, 07 Apr 2008 16:29:57 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[2.5]]></category>
		<category><![CDATA[activate]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[develop]]></category>
		<category><![CDATA[diagnose]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[menu]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[phpmyadmin]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://pressingpixels.com/10-plugins-to-use-in-wordpress-development/</guid>
		<description><![CDATA[In my ever benevolent state I&#8217;ve compiled a list of Wordpress plugins that should assist you as you create and install Wordpress for yourself and others.  I&#8217;ve used many of these and they are very valuable.
And for all you counters out there, I know there are actually twelve but the last two aren&#8217;t free [...]]]></description>
			<content:encoded><![CDATA[<p>In my ever benevolent state I&#8217;ve compiled a list of Wordpress plugins that should assist you as you create and install Wordpress for yourself and others.  I&#8217;ve used many of these and they are very valuable.</p>
<p>And for all you counters out there, I know there are actually twelve but the last two aren&#8217;t free and 10 sounds much more round in the title&#8230;</p>
<div class="clear"></div>
<h3>Admin Menu Drop Down</h3>
<p><img class="left" src='http://pressingpixels.com/wp-content/uploads/2008/04/1-admin-drop-down-menus.jpg' alt='Admin Menu Drop Down' />Hate clicking around to get to an option page buried deep in the Wordpress Admin soil?  Me too.  </p>
<p>This is typically the very first plugin I install.  When developing with Wordpress you spend a lot of time jumping back and forth in the WP admin menu and this plugin saves you a lot of clicks.  And if you are behind a slow corporate firewall it saves you a ton of time from the unnecessary page loads.  Get this plugin!</p>
<div class="clear"></div>
<p>2.5 compatible: Yes<br />
Plugin page: <a href="http://planetozh.com/blog/my-projects/wordpress-admin-menu-drop-down-css/">http://planetozh.com/blog/my-projects/wordpress-admin-menu-drop-down-css/</a></p>
<h3>One Click Install</h3>
<p><img class="left" src='http://pressingpixels.com/wp-content/uploads/2008/04/2-one-click-install.jpg' alt='One Click Install' />If the Admin Drop Down Menu plugin the first thing I install this plugin is a close second and sometimes first…  </p>
<p>This is an amazing plugin that can eliminate the downloading, unzipping, uploading circus that one must go through for each plugin he wishes to install.  With One Click you can copy the link to the zip file, paste it in the admin page, click go and your plugin is uploaded, unpacked and installed.  You just have to activate it.  Get this plugin!</p>
<div class="clear"></div>
<p>2.5 compatible: Yes<br />
Plugin page: <a href="http://anirudhsanjeev.org/oneclick-plugin/">http://anirudhsanjeev.org/oneclick-plugin/</a></p>
<h3>Activate All</h3>
<p><img class="left" src='http://pressingpixels.com/wp-content/uploads/2008/04/3-activate-all.jpg' alt='Activate All' />If you have a directory of plugins you use all the time for specific installs it may actually save you time to upload all at once and use this plugin.  </p>
<p>Once this plugin is activated it takes a stroll around the plugin folder and activates everything it can get its hands on with no additional work for you.</p>
<div class="clear"></div>
<p>2.5 compatible: Yes<br />
Plugin page: <a href="http://mass-automation.com/2006/10/19/activate-all-of-your-wordpress-plugins-with-one-click/">http://mass-automation.com/2006/10/19/activate-all-of-your-wordpress-plugins-with-one-click/</a></p>
<p>The download page on the site doesn&#8217;t seem to be working at the moment <a href='http://pressingpixels.com/wp-content/uploads/2008/04/activate_all.zip' title='Activate All'>so I&#8217;ll post my zip file of the plugin here.</a>  Please check the authors site first before using this one.  If the authors download comes back I&#8217;ll remove this link.</p>
<h3>Plugin Central</h3>
<p><img class="left" src='http://pressingpixels.com/wp-content/uploads/2008/04/4-plugin-central.jpg' alt='Plugin Central' />If this plugin and the One Click Install plugin could mate and have a love child, Wordpress plugin life would be sweet indeed.  </p>
<p>Plugin Central allows you to automatically update all of your plugins and install new plugins from the dashboard.  It also generates a list of all plugins and active plugins from its settings page.</p>
<p>The only downsides to this plugin is that there is a giant author credit right at the forefront of the dashboard which may not be professional for some client installs.  And in order to install plugins automatically they must be in the Wordpress plugin repository.  </p>
<p>(Update) The plugin has been updated.  The newest version has removed the author credit and allows you to install files from the url (any zip file should work).</p>
<div class="clear"></div>
<p>2.5 compatible: Yes – And only WP 2.5<br />
Plugin page: <a href="http://www.prelovac.com/vladimir/wordpress-plugins/plugin-central">http://www.prelovac.com/vladimir/wordpress-plugins/plugin-central</a></p>
<h3>PHP Info</h3>
<p><img class="left" src='http://pressingpixels.com/wp-content/uploads/2008/04/5-php-info.jpg' alt='PHP Info' />If you need to know if your eAccelerator is enabled this plugin is for you.  </p>
<p>It also gives you other pertinent php and Wordpress specific information.  </p>
<div class="clear"></div>
<p>2.5 compatible: Yes<br />
Plugin page: <a href="http://wordpress.designpraxis.at/plugins/phpinfo/">http://wordpress.designpraxis.at/plugins/phpinfo/</a></p>
<h3>WP-Debug</h3>
<p><img class="left" src='http://pressingpixels.com/wp-content/uploads/2008/04/6-debug.jpg' alt='WP-Debug' />If you are into writing a lot of php and need to do some debugging because your code just doesn’t seem to work this plugin may help.  </p>
<p>(update)  The plugin has Krumo bundled with it and you don&#8217;t need to be a hard core php developer to use this.  The author uses it a lot for theme design.  This could be a very valuable time saving plugin.</p>
<div class="clear"></div>
<p>2.5 compatible: Yes<br />
Plugin page: <a href="http://www.siolon.com/2007/wp-debug/">http://www.siolon.com/2007/wp-debug/</a></p>
<h3>Diagnosis</h3>
<p><img class="left" src='http://pressingpixels.com/wp-content/uploads/2008/04/11-diagnosis.jpg' alt='Diagnosis' />If you are an information junkie and need to know-it-all, this plugin is for you.  It displays all sorts of technical data about the server Wordpress is installed on.</p>
<div class="clear"></div>
<p>2.5 compatible: Yes<br />
Plugin page: <a href="http://nlindblad.org/wordpress/diagnosis">http://nlindblad.org/wordpress/diagnosis</a></p>
<h3>DB Backup</h3>
<p><img class="left" src='http://pressingpixels.com/wp-content/uploads/2008/04/7-db-backup.jpg' alt='DB Backup' />Before you start screwing around with stuff too much you might want to do a database backup.  </p>
<p>Don’t come to this site crying when your really cool modified version of the Hello plugin wiped out all your posts from the last 10 years.</p>
<div class="clear"></div>
<p>2.5 compatible: Yes<br />
Plugin page: <a href="http://www.ilfilosofo.com/blog/wp-db-backup/">http://www.ilfilosofo.com/blog/wp-db-backup/</a></p>
<h3>PHP My-Admin</h3>
<p><img class="left" src='http://pressingpixels.com/wp-content/uploads/2008/04/8-php-my-admin.jpg' alt='PHP My-Admin' />After you screwed up your database from your awesome new plugin you created you’ll need to access it to delete all of the entries it made.  </p>
<p>This would normally be a pain but if you have the phpMyAdmin plugin installed its easy access from your Wordpress admin.</p>
<div class="clear"></div>
<p>2.5 compatible: Yes<br />
Plugin page: <a href="http://wordpress.designpraxis.at/plugins/wp-phpmyadmin/">http://wordpress.designpraxis.at/plugins/wp-phpmyadmin/</a></p>
<h3>Site Unavailable</h3>
<p><img class="left" src='http://pressingpixels.com/wp-content/uploads/2008/04/12-site-unavailable.jpg' alt='Site Unavailable' />As you are developing the next Bloggie worthy site you probably don’t want the whole world peeking in.  </p>
<p>This plugin hides the site and lets the user know it is down for maintenance.  The plugin includes a style sheet so you can pretty up the default screen.  </p>
<p>The author also credits himself on the unavailable screen which might be unprofessional for some client installs.</p>
<div class="clear"></div>
<p>2.5 compatible: Yes<br />
Plugin page: <a href="http://thefunzone.awardspace.com/wordpress/?page_id=51">http://thefunzone.awardspace.com/wordpress/?page_id=51</a></p>
<h3>Auto-Installer (not free)</h3>
<p><img class="left" src='http://pressingpixels.com/wp-content/uploads/2008/04/9-auto-installer.jpg' alt='Auto-Installer (not free)' />While not free this plugin looks like it could be very useful to the right person.  WP Auto-Installer allows you to easily create Wordpress blogs with just a few clicks.</p>
<div class="clear"></div>
<p>2.5 compatible: Should be if you have to pay for it.<br />
Plugin page: <a href="http://wpautoinstaller.com/">http://wpautoinstaller.com/</a></p>
<h3>WordPress Cloner (not free)</h3>
<p><img class="left" src='http://pressingpixels.com/wp-content/uploads/2008/04/10-cloner.jpg' alt='WordPress Cloner (not free)' />WP Cloner scans the settings, plugins and posts of your perfectly configured blog and then allows you quickly configure any other blog with those exact details. It basically copies the configuration of one blog and pastes it onto any number of other blog.</p>
<div class="clear"></div>
<p>2.5 compatible: Should be if you have to pay for it.<br />
Plugin page: <a href="http://wp-cloner.com/">http://wp-cloner.com/<br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://pressingpixels.com/10-plugins-to-use-in-wordpress-development/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Frameworks for Wordpress</title>
		<link>http://pressingpixels.com/frameworks-for-wordpress/</link>
		<comments>http://pressingpixels.com/frameworks-for-wordpress/#comments</comments>
		<pubDate>Thu, 03 Apr 2008 17:04:04 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[960]]></category>
		<category><![CDATA[blueprint]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[magazine]]></category>
		<category><![CDATA[markup]]></category>
		<category><![CDATA[sandbox]]></category>
		<category><![CDATA[semantic]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://pressingpixels.com/frameworks-for-wordpress/</guid>
		<description><![CDATA[At the beginning of this year I discovered an article by Jeff Croft in the web magazine A List Apart.  In it he extols the virtues of using a framework when designing web sites.  Frameworks have been used forever in the coding and programming of applications and it seemed only natural that CSS [...]]]></description>
			<content:encoded><![CDATA[<p>At the beginning of this year I discovered <a href="http://www.alistapart.com/articles/frameworksfordesigners">an article by Jeff Croft</a> in the web magazine <a href="http://www.alistapart.com">A List Apart</a>.  In it he extols the virtues of using a framework when designing web sites.  Frameworks have been used forever in the coding and programming of applications and it seemed only natural that CSS and XHTML would follow suit.</p>
<p>According to Croft a framework is:</p>
<blockquote><p>“…a set of tools, libraries, conventions, and best practices that attempt to abstract routine tasks into generic modules that can be reused. The goal here is to allow the designer or developer to focus on tasks that are unique to a given project, rather than reinventing the wheel each time around.”</p></blockquote>
<p>After reading the article and doing some additional research on the subject I thought it made complete sense.  In fact I had been using my own pseudo framework for Wordpress development – using existing Wordpress templates as a layout and coding guide.</p>
<p>My workflow went something like this:</p>
<ol>
<li>Mock up the home page and maybe a couple other pages in Photoshop.</li>
<li>
Search for a Wordpress theme that has a similar layout to my mockup</li>
<li>
Evaluate the themes I found for the best semantic seo friendly markup</li>
<li>
Wrangle the code to insert my images and functions into the site.</li>
<li>Rinse and repeat.</li>
</ol>
<p>One of the advantages in using Wordpress is that there are literally thousands of frameworks already in existence.  In fact one could argue that every single theme built for Wordpress is a framework.  So how can this help you the Wordpress developer and designer?  I’ve compiled a list of themes that in my opinion provide the best frameworks for developing in Wordpress.</p>
<p>Please note.  I am in no way advocating blatant copying of stylesheets or markup in anyway.  These themes are to be used as a guide</p>
<h3>Typography and Semantic Markup</h3>
<ul>
<li><a href="http://www.pearsonified.com/2007/06/copyblogger_theme_for_wordpress.php">Copyblogger</a></li>
<li><a href="http://cutline.tubetorial.com/">Cutline</a></li>
<li>
<a href="http://diythemes.com/thesis/">Thesis</a> (not free – but incredibly awesome nonetheless)</li>
</ul>
<h3>Magazine Style</h3>
<ul>
<li><a href="http://themasterplan.in/themes/the-morning-after/">The Morning After</a></li>
<li><a href="http://5thirtyone.com/grid-focus">Grid Focus</a></li>
</ul>
<h3>Sandbox and Other Very Flexible Themes</h3>
<ul>
<li><a href="http://www.plaintxt.org/themes/sandbox/">Sandbox</a></li>
<li><a href="http://iamww.com/wordpress-theme-moo-point">Moo-Point</a></li>
<li><a href="http://www.sndbx.org/results/designs/sandpress/">Sandpress</a></li>
</ul>
<p>If there are other themes you have used and loved for a framework let it be made known in the comments!</p>
<p>On a side note, more recently instead of using actual Wordpress themes I’ve been using specific frameworks that you might be interested in taking a look at. </p>
<p><a href="http://code.google.com/p/blueprintcss/">Blueprint</a> is a framework that is very popular.  According to its site these are some of its notable features:</p>
<ul>
<li>An easily customizable grid</li>
<li>Sensible typography</li>
<li>Relative font-sizes everywhere</li>
<li>A typographic baseline</li>
<li>Perfected CSS reset</li>
<li>A stylesheet for printing</li>
<li>Powerful scripts for customizing your layout</li>
<li>No bloat of any kind  </li>
</ul>
<p>Another brilliant framework I’ve discovered in the last couple of weeks is <a href="http://960.gs/">960</a> by <a href="http://sonspring.com">Nathan Smith</a>.  One of the main differences between 960 and Blueprint is the size of grid used and how many columns are included.  Blueprint has a width of 950px broken into 24 columns.  960 has a width of…wait for it…960px!  And it is broken into 16 and 12 columns respectively.</p>
<p>No matter what you use I think most people will agree that having some sort of framework in your workflow will greatly increase your productivity.  And at least for me not having to put my limited brain power in those areas leaves it open for more creativity.</p>
]]></content:encoded>
			<wfw:commentRss>http://pressingpixels.com/frameworks-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
