<?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>Grapii &#187; WordPress</title>
	<atom:link href="http://www.grapii.com/tag/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.grapii.com</link>
	<description>Personal Site of Raj Patel</description>
	<lastBuildDate>Mon, 06 Sep 2010 13:45:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Desktop Client for WordPress</title>
		<link>http://www.grapii.com/2009/07/desktop-client-for-wordpress/</link>
		<comments>http://www.grapii.com/2009/07/desktop-client-for-wordpress/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 15:16:00 +0000</pubDate>
		<dc:creator>grapii</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.grapii.com/2009/07/desktop-client-for-wordpress/</guid>
		<description><![CDATA[Just came across Windows Live Writer 2009, a client based blog writing tool.&#160; Apart from the usual Windows Live Space and SharePoint, the application actually works with other non-Microsoft blogging applications including WordPress.
 
It’s actually very simple, just follow the wizard and you’re all set to go.&#160; One of the great things about it is [...]]]></description>
			<content:encoded><![CDATA[<p>Just came across <a title="Windows Live Writer" href="http://windowslivewriter.spaces.live.com/" target="_blank">Windows Live Writer 2009</a>, a client based blog writing tool.&#160; Apart from the usual Windows Live Space and SharePoint, the application actually works with other non-Microsoft blogging applications including <a href="http://www.wordpress.org" target="_blank">WordPress</a>.</p>
<p> <span id="more-366"></span>
<p>It’s actually very simple, just follow the wizard and you’re all set to go.&#160; One of the great things about it is that it displays you’re current WP theme in the editor, and conforms to the CSS aswell….which means you can see exactly how you’re post will be displayed.</p>
<p>Aswell as all the usual editing features such as inserting links, pictures, tables, you can also add extra plug-ins developed by the community, most of which are free.</p>
<p>This is a great tool and best of all it’s Free!&#160; </p>
<p align="center"><a href="http://www.grapii.com/wp-content/uploads/2009/07/windowslivewriter.png" rel="lightbox[366]"><img title="WindowsLiveWriter" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="307" alt="WindowsLiveWriter" src="http://www.grapii.com/wp-content/uploads/2009/07/windowslivewriter-thumb.png" width="240" border="0" /></a> </p>
<p><em>I wrote this post using Windows Live Writer 2009</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.grapii.com/2009/07/desktop-client-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change WordPress Meta Widget</title>
		<link>http://www.grapii.com/2009/06/change-wordpress-meta-widget/</link>
		<comments>http://www.grapii.com/2009/06/change-wordpress-meta-widget/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 00:53:09 +0000</pubDate>
		<dc:creator>grapii</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.grapii.com/?p=326</guid>
		<description><![CDATA[Want to change your meta links contained in a WordPress sidebar widget?


[2.9] If you are trying to edit the meta data that appears in the sidebar of your Wordpress blog, such as removing the RSS links, find this code in /includes/default-widgets.php file and remove/comment the unwanted lines.
This is what the original class looks like:
class WP_Widget_Meta [...]]]></description>
			<content:encoded><![CDATA[<p>Want to change your meta links contained in a WordPress sidebar widget?</p>
<p><span id="more-326"></span></p>
<p style="text-align: center;"><img class="size-full wp-image-328 title=" src="http://www.grapii.com/wp-content/uploads/2009/06/metalink.png" alt="Meta Link" width="162" height="87" /></p>
<p style="text-align: left;">[2.9] If you are trying to edit the meta data that appears in the sidebar of your Wordpress blog, such as removing the RSS links, find this code in <tt>/includes/default-widgets.php</tt> file and remove/comment the unwanted lines.</p>
<p style="text-align: left;">This is what the original class looks like:</p>
<pre>class WP_Widget_Meta extends WP_Widget {

	function WP_Widget_Meta() {
		$widget_ops = array('classname' =&gt; 'widget_meta', 'description' =&gt; __( "Log in/out, admin, feed and WordPress links") );
		$this-&gt;WP_Widget('meta', __('Meta'), $widget_ops);
	}

	function widget( $args, $instance ) {
		extract($args);
		$title = apply_filters('widget_title', empty($instance['title']) ? __('Meta') : $instance['title']);

		echo $before_widget;
		if ( $title )
			echo $before_title . $title . $after_title;
?&gt;
			&lt;ul&gt;
			&lt;?php wp_register(); ?&gt;
			&lt;li&gt;&lt;?php wp_loginout(); ?&gt;&lt;/li&gt;
			&lt;li&gt;&lt;a href="&lt;?php bloginfo('rss2_url'); ?&gt;" title="&lt;?php echo esc_attr(__('Syndicate this site using RSS 2.0')); ?&gt;"&gt;&lt;?php _e('Entries &lt;abbr title="Really Simple Syndication"&gt;RSS&lt;/abbr&gt;'); ?&gt;&lt;/a&gt;&lt;/li&gt;
			&lt;li&gt;&lt;a href="&lt;?php bloginfo('comments_rss2_url'); ?&gt;" title="&lt;?php echo esc_attr(__('The latest comments to all posts in RSS')); ?&gt;"&gt;&lt;?php _e('Comments &lt;abbr title="Really Simple Syndication"&gt;RSS&lt;/abbr&gt;'); ?&gt;&lt;/a&gt;&lt;/li&gt;
			&lt;li&gt;&lt;a href="http://wordpress.org/" title="&lt;?php echo esc_attr(__('Powered by WordPress, state-of-the-art semantic personal publishing platform.')); ?&gt;"&gt;WordPress.org&lt;/a&gt;&lt;/li&gt;
			&lt;?php wp_meta(); ?&gt;
			&lt;/ul&gt;
&lt;?php
		echo $after_widget;
	}</pre>
<p style="text-align: left;">And this is my modified one:</p>
<pre>class WP_Widget_Meta extends WP_Widget {

	function WP_Widget_Meta() {
		$widget_ops = array('classname' =&gt; 'widget_meta', 'description' =&gt; __( "Log in/out, admin, feed and WordPress links") );
		$this-&gt;WP_Widget('meta', __('Meta'), $widget_ops);
	}

	function widget( $args, $instance ) {
		extract($args);
		$title = apply_filters('widget_title', empty($instance['title']) ? __('Meta') : $instance['title']);

		echo $before_widget;
		if ( $title )
			echo $before_title . $title . $after_title;
?&gt;
			&lt;ul&gt;
			&lt;?php wp_register(); ?&gt;
			&lt;li&gt;&lt;?php wp_loginout(); ?&gt;&lt;/li&gt;
			&lt;?php wp_meta(); ?&gt;
			&lt;/ul&gt;
&lt;?php
		echo $after_widget;
	}</pre>
<p style="text-align: left;">[Pre 2.9] If you are trying to edit the meta data that appears in the sidebar of your Wordpress blog, such as removing the RSS links, find this code in <tt>/includes/widget.php</tt> file and remove the unwanted lines.</p>
<p>This is what the original looks like:</p>
<pre>/**
 * Display meta widget.
 *
 * Displays log in/out, RSS feed links, etc.
 *
 * @since 2.2.0
 *
 * @param array $args Widget arguments.
 */
function wp_widget_meta($args) {
	extract($args);
	$options = get_option('widget_meta');
	$title = empty($options['title']) ? __('Meta') : apply_filters('widget_title', $options['title']);
?&gt;
		&lt;?php echo $before_widget; ?&gt;
			&lt;?php echo $before_title . $title . $after_title; ?&gt;
			&lt;ul&gt;
			&lt;?php wp_register(); ?&gt;
			&lt;li&gt;&lt;?php wp_loginout(); ?&gt;&lt;/li&gt;
			&lt;li&gt;&lt;a href="&lt;?php bloginfo('rss2_url'); ?&gt;" title="&lt;?php echo attribute_escape(__('Syndicate this site using RSS 2.0')); ?&gt;"&gt;&lt;?php _e('Entries &lt;abbr title="Really Simple Syndication"&gt;RSS&lt;/abbr&gt;'); ?&gt;&lt;/a&gt;&lt;/li&gt;
			&lt;li&gt;&lt;a href="&lt;?php bloginfo('comments_rss2_url'); ?&gt;" title="&lt;?php echo attribute_escape(__('The latest comments to all posts in RSS')); ?&gt;"&gt;&lt;?php _e('Comments &lt;abbr title="Really Simple Syndication"&gt;RSS&lt;/abbr&gt;'); ?&gt;&lt;/a&gt;&lt;/li&gt;
			&lt;li&gt;&lt;a href="http://wordpress.org/" title="&lt;?php echo attribute_escape(__('Powered by WordPress, state-of-the-art semantic personal publishing platform.')); ?&gt;"&gt;WordPress.org&lt;/a&gt;&lt;/li&gt;
			&lt;?php wp_meta(); ?&gt;
			&lt;/ul&gt;
		&lt;?php echo $after_widget; ?&gt;
&lt;?php
}</pre>
<p>And this is my modified one:</p>
<pre>/**
 * Display meta widget.
 *
 * Displays log in/out, RSS feed links, etc.
 *
 * @since 2.2.0
 *
 * @param array $args Widget arguments.
 */
function wp_widget_meta($args) {
	extract($args);
	$options = get_option('widget_meta');
	$title = empty($options['title']) ? __('Meta') : apply_filters('widget_title', $options['title']);?&gt;
		&lt;?php echo $before_widget; ?&gt;
			&lt;?php echo $before_title . $title . $after_title; ?&gt;
			&lt;ul&gt;
			&lt;?php wp_register(); ?&gt;
			&lt;li&gt;&lt;?php wp_loginout(); ?&gt;&lt;/li&gt;
			&lt;?php wp_meta(); ?&gt;
			&lt;/ul&gt;
		&lt;?php echo $after_widget; ?&gt;
&lt;?php
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.grapii.com/2009/06/change-wordpress-meta-widget/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Convert HTML</title>
		<link>http://www.grapii.com/2009/05/convert-html/</link>
		<comments>http://www.grapii.com/2009/05/convert-html/#comments</comments>
		<pubDate>Tue, 12 May 2009 19:38:08 +0000</pubDate>
		<dc:creator>grapii</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.grapii.com/?p=313</guid>
		<description><![CDATA[Some of my posts include snippets of code that help explain the process or describe what needs to be done. Most of the code is written in Visual Studio or Dreamweaver, and as such simply copying and pasting the code into the blog post doesn&#8217;t work.

Why? well it&#8217;s because the server thinks it&#8217;s code that [...]]]></description>
			<content:encoded><![CDATA[<p>Some of my posts include snippets of code that help explain the process or describe what needs to be done. Most of the code is written in Visual Studio or Dreamweaver, and as such simply copying and pasting the code into the blog post doesn&#8217;t work.<br />
<span id="more-313"></span><br />
Why? well it&#8217;s because the server thinks it&#8217;s code that needs to be compiled and rendered. Using the <tt>&lt;pre&gt;</tt> tag, also doesn&#8217;t always work and switching between the Visual editor and the HTML editor can cause weird results. So in order to accomplish this task really easy, I&#8217;ve created <a title="Convert HTML" href="http://resource.grapii.com/converthtml.html" target="_blank">Convert HTML</a>. Convert HTML is a simple web page that allows you to convert code tags such as <strong>&lt;</strong> and <strong>&gt;</strong> into their character entities (<strong>&amp;lt;</strong> and <strong>&amp;gt;</strong>), which is then ignored by the server for compiling, but renders correctly on the browser.</p>
<p>Very simple to use, just got to this page and paste in your code including the <strong>&lt;</strong> and <strong>&gt;</strong>, then click on Convert.  Your code should now be shown, where the special characters have been replaced by the character entities.  Simply copy the new code, and paste it inside your <tt>&lt;pre&gt;</tt> tags.</p>
<p>Here&#8217;s an example using Convert HTML</p>
<pre>&lt;ul&gt;
 &lt;li&gt;&lt;a href="&lt;?php echo get_option('home'); ?&gt;/"&gt;Home&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;
  &lt;?php wp_list_pages('title_li=&amp;depth=1'); ?&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;a class="" href="http://www.grapii.com/?cat=13"&gt;&lt;span&gt;Glossary&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.grapii.com/2009/05/convert-html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flowplayer for WordPress</title>
		<link>http://www.grapii.com/2009/05/flowplayer-for-wordpress/</link>
		<comments>http://www.grapii.com/2009/05/flowplayer-for-wordpress/#comments</comments>
		<pubDate>Tue, 05 May 2009 19:41:36 +0000</pubDate>
		<dc:creator>grapii</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.grapii.com/?p=266</guid>
		<description><![CDATA[I was looking for a simple media player that could play videos that I had created at home.  One of the great things about Magix Movie Edit Pro is that you can output your finished masterpiece in MP4 or FLV format.  Which is great as it keeps the file size small and enables [...]]]></description>
			<content:encoded><![CDATA[<p>I was looking for a simple media player that could play videos that I had created at home.  One of the great things about <a title="Magix Movie Edit Pro" href="http://www.magix.com/uk/movie-edit-pro/plus/" target="_blank">Magix Movie Edit Pro</a> is that you can output your finished masterpiece in MP4 or FLV format.  Which is great as it keeps the file size small and enables me to share my videos to family members across the world.<br />
<span id="more-266"></span></p>
<p>Problem was I just couldn&#8217;t find a simple plugin for WordPress.  There are many out there, mostly for embedding videos from external locations such as YouTube or Google Video, but not easily from the local file server, you have to specify the full URL.  Also, I didn&#8217;t want to keep remebering all the different parameters that needed to be set for each video, there may be months between video posts, no way I can remeber all the settings!</p>
<p>So, I decided to write my own simple WordPress plugin using <a title="FlowPlayer" href="http://flowplayer.org/" target="_blank">Flowplayer</a>.  The plugin adds flowplayer to the WordPress blog, it comes pre-configured and is very very easy to use.   All you need is the name of the video and it&#8217;s resolution (width and height).</p>
<p>The plugin comes with flowplayer version 3.1.0 which is able to play the following formats;</p>
<ul>
<li>H.264</li>
<li>FLV</li>
<li>MP4</li>
</ul>
<p>It is supported by the folowing browsers;</p>
<ul>
<li>Internet Explorer 6.0+</li>
<li>Firefox FF 2+</li>
<li>Safari 2.0+</li>
<li>Opera 9.0+</li>
</ul>
<p>The plugin has the following features;</p>
<ul>
<li>Graphical add button (Visual Editor)</li>
<li>HTML add button (HTML Editor)</li>
<li>Very easy to use</li>
</ul>
<h3>Installation</h3>
<p>Upload the <tt>wp-flowplayer</tt> directory to the <tt>/wp-content/plugins/</tt> directory<br />
Activate the plugin through the &#8216;Plugins&#8217; menu in WordPress</p>
<h3>Usage</h3>
<p>Upload your video to <tt>/wp-content/videos/</tt>.</p>
<p>Create a new post/page and click the flow button (in either Visual editor or HTML editor) and replace the prefilled parameters with your video specific information.</p>
<p>For example this entry;</p>
<pre>flow href="myvideo.mp4" width="320" height="240"</pre>
<p>would add the video <tt>myvideo.mp4</tt> with the width 320 and the height 240 to your post.</p>
<h3>Screenshots</h3>
<p><a href="http://www.grapii.com/wp-content/uploads/2009/05/wp-flowplayer-01.png" rel="lightbox[266]"><img class="aligncenter size-medium wp-image-270" title="wp-flowplayer-01" src="http://www.grapii.com/wp-content/uploads/2009/05/wp-flowplayer-01-300x128.png" alt="wp-flowplayer-01" width="300" height="128" /></a></p>
<p><a href="http://www.grapii.com/wp-content/uploads/2009/05/wp-flowplayer-02.png" rel="lightbox[266]"><img class="aligncenter size-medium wp-image-271" title="wp-flowplayer-02" src="http://www.grapii.com/wp-content/uploads/2009/05/wp-flowplayer-02-300x127.png" alt="wp-flowplayer-02" width="300" height="127" /></a></p>
<h3>Download</h3>
<p>Download the wp-flowplayer plugin and install using the instructions above. If you have any issues please contact me and let me know.</p>
<p class="note"><a href="http://resource.grapii.com/wp-flowplayer.zip">Download wp-flowplayer plugin</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.grapii.com/2009/05/flowplayer-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Hide WordPress Pages from the Navigation Menu</title>
		<link>http://www.grapii.com/2009/03/hide-wordpress-pages-from-the-navigation-menu/</link>
		<comments>http://www.grapii.com/2009/03/hide-wordpress-pages-from-the-navigation-menu/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 13:48:37 +0000</pubDate>
		<dc:creator>grapii</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.grapii.com/?p=232</guid>
		<description><![CDATA[Having recently purchased an iPhone 3G, I&#8217;ve installed on my blog site WPtouch.  WPtouch is a plug-in that transforms your blog into an application-style theme when you browse to your site using your iPhone.  However, to get the tag cloud and monthly archive list to appear, you must have an Archives page, which [...]]]></description>
			<content:encoded><![CDATA[<p>Having recently purchased an <a title="The Dark Side" href="http://www.grapii.com/index.php/2009/02/21/the-dark-side/" target="_self">iPhone 3G</a>, I&#8217;ve installed on my blog site <a title="WPTouch for WordPress" href="http://wordpress.org/extend/plugins/wptouch/" target="_blank">WPtouch</a>.  WPtouch is a plug-in that transforms your blog into an application-style theme when you browse to your site using your iPhone.  However, to get the tag cloud and monthly archive list to appear, you must have an Archives page, which is based on the Archive template.  <span id="more-232"></span>This is accomplished relatively easily, and works really well on the iPhone, but leaves me with an empty page on my site when browsing using a standard PC and my default theme.  By supplying the page ID to the Exclude prompt of the pages widget it removed the Archives page entry from the right-hand column, but I still had the Archive link at the top of my site, the navigation menu.</p>
<p>So how can I remove the Archives page from the navigation menu, but leave the code intact so that the other page links function and appear as normal? Well, that’s a little tricky, but here’s how:</p>
<ol>
<li>In the WordPress theme editor, open up the <tt>header.php</tt> file and find the following line:
<pre>&lt;?php wp_list_pages('title_li=&amp;depth=1'); ?&gt;</pre>
</li>
<li>Enter <tt>&amp;exclude=</tt> near the end of the line, but inside the brackets. The code should look like this:
<pre>&lt;?php wp_list_pages('title_li=&amp;depth=1&amp;exclude='); ?&gt;</pre>
</li>
<li>Now, all you have to do is add the page ID number or numbers that you want to hide after the <tt>&amp;exclude=</tt>.  If more than one page needs hiding, make sure you separate the page ID&#8217;s with commas.  In my case, the Archives page has an ID of 173, so my code looks like this:
<pre>&lt;?php wp_list_pages('title_li=&amp;depth=1&amp;exclude=173'); ?&gt;</pre>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.grapii.com/2009/03/hide-wordpress-pages-from-the-navigation-menu/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Create a Glossary with WordPress</title>
		<link>http://www.grapii.com/2008/02/create-a-glossary-with-wordpress/</link>
		<comments>http://www.grapii.com/2008/02/create-a-glossary-with-wordpress/#comments</comments>
		<pubDate>Fri, 29 Feb 2008 14:50:37 +0000</pubDate>
		<dc:creator>grapii</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.grapii.com/?p=73</guid>
		<description><![CDATA[[EDIT: Tested with WordPress 2.7.1]
I wanted to create a glossary that facilitates terms, buzz words and acronyms used in modern computing. I needed something that was simple to update and manage, and use the capabilities of WordPress rather than creating a simple page with hyperlinks/bookmarks, which would require jumping back and forth into code. I [...]]]></description>
			<content:encoded><![CDATA[<p><em>[EDIT: Tested with WordPress 2.7.1]</em><br />
I wanted to create a glossary that facilitates terms, buzz words and acronyms used in modern computing. I needed something that was simple to update and manage, and use the capabilities of WordPress rather than creating a simple page with hyperlinks/bookmarks, which would require jumping back and forth into code. <span id="more-73"></span>I found a few Glossary plugins like <a title="IMM-Glossary WordPress Plugin" href="http://www.internetmarketingmonitor.org/word-press-plugins/imm-glossary-wordpress-plugin" target="_blank">IMM-Glossary</a>, which did have management of the glossary posts, however, the definitions were in plain text, and wouldn&#8217;t allow formatting. I wanted my text to be formatted using headings, bullet points, even pictures. After many hours of googling and hours of trail and error, I&#8217;ve come up with my perfect glossary solution.</p>
<p>This solution allows me to create the glossary content using WordPress posts, and manage the content like any other posts. It uses a mixture of plugins, templates and custom code, and for me it works really well.</p>
<h3>Step 1</h3>
<p>Download and install the <a title="WP-SNAP! WordPress Plugin" href="http://www.nateomedia.com/wares/downloads/wordpress/wp-snap/" target="_blank">WP-SNAP!</a> plugin. WP-SNAP! creates an alphabetical listing of post titles on a Category or Page template file. Navigation through the listings WP-SNAP! generates is accomplished using the alphabet itself. (For example, if a site visitor clicked on the letter D, any post titles that began with that letter would be showcased.) WP-SNAP! will work on any WordPress 2.1.x or higher site, but is particularly useful managing glossaries, indexes, reviews, or directories.</p>
<h3>Step 2</h3>
<p>To hold all my glossary terms I need to create a new category in WordPress. I called this category &#8220;Glossary&#8221;, and made a note of it&#8217;s ID (13).</p>
<p>Now that I have my category, I need to change the display of the page when someone clicks on Glossary to make use of the WP-SNAP! plugin, and if anyone clicked on the other categories they would get the &#8216;normal&#8217; layout. For this I made use of the category template and the template hierarchy.</p>
<p>The first step in modifying what happens when someone visits a Category page is to figure out which of your theme&#8217;s files is going to be used to display the posts. This is known as the Template Hierarchy.</p>
<p>In the case of categories, the hierarchy is fairly simple. For instance, the ID number of the Glossary category is 13. The Template Hierarchy specifies that WordPress will use the first Template file it finds in your current Theme&#8217;s directory from the following list:</p>
<ol>
<li>category-13.php</li>
<li>category.php</li>
<li>archive.php</li>
<li>index.php</li>
</ol>
<p>That is, if you do not have a <tt>category-13.php</tt>, WordPress will check for a <tt>category.php</tt>, and so on. So, if you want to make the Category whose ID number is 13 look different from what it is currently (and different from other Category pages), you would want to create a <tt>category-13.php</tt> file. If you want to make all Category pages look different from other archive pages (such as date and author archives), then you would want to create or modify the <tt>category.php</tt> file. If you want to make changes to the look of all archive pages, you can create or modify the <tt>archive.php</tt> file. And if you modify the <tt>index.php</tt> file, you will affect your entire blog.</p>
<p>So to create a new <tt>category-13.php </tt>glossary file I copied the next file in the hierarchy that existed in this case <tt>archive.php</tt>.</p>
<p>I made a few changes to the category-13.php page to remove the post dates, tags etc and added the WP-SNAP! configuration line.</p>
<pre>&lt;?php get_header(); ?&gt;
 &lt;!-- Container --&gt;
 &lt;div id="content"&gt;
  &lt;!-- Start Postwrap --&gt;
  &lt;div class="postwrap"&gt;
   &lt;?php if (have_posts()) : ?&gt;
    &lt;?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?&gt;
    &lt;?php /* If this is a category archive */ if (is_category()) { ?&gt;
     &lt;h2 class="pagetitle"&gt;&lt;?php single_cat_title(); ?&gt;&lt;/h2&gt;
     &lt;?php } ?&gt;
      &lt;?php if (function_exists('wp_snap')) { echo wp_snap(13, FALSE); } ?&gt;
      &lt;p&gt;&amp;nbsp;&lt;/p&gt;
       &lt;?php while (have_posts()) : the_post(); ?&gt;
       &lt;div class="Post" id="post-&lt;?php the_ID(); ?&gt;" style="padding-bottom: 40px;"&gt;
        &lt;div class="posthead"&gt;
         &lt;h1&gt;&lt;a title="Permanent Link to &lt;?php the_title(); ?&gt;" href="&lt;?php the_permalink() ?&gt;" rel="bookmark"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h1&gt;
         &lt;small class="postauthor"&gt;&lt;?php edit_post_link('Edit'); ?&gt;&lt;/small&gt;
        &lt;/div&gt;
        &lt;div class="postcontent"&gt;
         &lt;?php the_content() ?&gt;
        &lt;/div&gt;
        &lt;div class="clearer"&gt;&lt;/div&gt;
       &lt;/div&gt;
      &lt;?php endwhile; ?&gt;
     &lt;?php else : ?&gt;
    &lt;h2&gt;Not Found&lt;/h2&gt;
    &lt;?php include (TEMPLATEPATH . '/searchform.php'); ?&gt;
   &lt;?php endif; ?&gt;
  &lt;/div&gt;
  &lt;!-- End Postwrap --&gt;
  &lt;?php get_sidebar(); ?&gt;
  &lt;!-- Container --&gt;
 &lt;/div&gt;
&lt;?php get_footer(); ?&gt;</pre>
<h3>Step 3</h3>
<p>Add some CSS style to your WordPress theme to style the ABC layout, the style I used was was:</p>
<pre>ol.snap_nav {
 display: inline;
 float: left;
 clear: both;
 list-style: none;
 font-size: 12px;
 letter-spacing: 3px;
}

ol.snap_nav li {
 display: block;
 float: left;
 padding: 0 2px 10px 0;
}

ol.snap_nav li a {
 font-weight: bold;
}

ol.snap_nav li.snap_selected a {
 font-weight: normal;
 font-size: 20px;
 text-decoration: none;
 color : #003399;
}</pre>
<h3>Step 4</h3>
<p>Now that the glossary is all setup, a few final tweaks. If I add a new term to the glossary category, I don&#8217;t want it appearing in the front page blog nor in the rss feeds. I looked around to find a way of omitting a certain category from the front page, and although there were a few plugins available, I found this an overkill for this one-off implementation. I finally found some code that can be used. All you need to do is add the following code anywhere in the theme <tt>functions.php</tt> file.</p>
<pre>/* Exclude Category from Main Page and RSS Feeds. Used for Glossary(ID=13) Category. */
function myFilter($query) {
	if ($query-&gt;is_feed || $query-&gt;is_home) {
		$query-&gt;set('cat','-13');
	}

return $query;
}

add_filter('pre_get_posts','myFilter');</pre>
<p>The code example above excludes the glossary category (13) from the RSS feed and main page. If you want to exclude multiple categories, simply add a comma (,) and a dash (-) followed by the category ID e.g. &#8216;-5,-6,-7&#8242;.</p>
<h3>Step 5</h3>
<p>So far so good. I now wanted the glossary link to appear as a page, i.e. I wanted it to look like a page and have the link at the top where my WordPress pages lived. There were several options available, all using various plugins or required creating pseudo pages and linking it back to a category, all of which looked to messy for me. So instead, I just modified my themes header.php file and created a physical link to the category page. I inserted the following code, just after the code for WordPress page links</p>
<pre>&lt;ul&gt;
 &lt;li&gt;&lt;a href="&lt;?php echo get_option('home'); ?&gt;/"&gt;Home&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;
  &lt;?php wp_list_pages('title_li=&amp;depth=1'); ?&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;a class="" href="http://www.grapii.com/?cat=13"&gt;&lt;span&gt;Glossary&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</pre>
<h3>Step 6</h3>
<p>Finally, as I had the glossary category as a page link, I wanted to hide the glossary category from the category widget. Once again, plenty of plugins available, but for me again this was an overkill. Having searched various forums I came across the best way to achieve this. This solution requires changes to the WordPress core file <tt>widgets.php</tt>. I know this is not ideal, and if I upgrade to the next version of WordPress I&#8217;d loose my changes, but hey, that&#8217;s what this article is for, so I can recreate the glossary fairly easy.</p>
<p>Find this line in <tt>/wp-includes/widgets.php</tt></p>
<pre>$cat_args = "orderby=name&amp;show_count={$c}&amp;hierarchical={$h}";</pre>
<p>In WordPress 2.7.1 its</p>
<pre>$cat_args = array('orderby' =&gt; 'name', 'show_count' =&gt; $c, 'hierarchical' =&gt; $h);</pre>
<p>and add the <tt>&amp;exclude</tt> (WordPress 2.7.1 = <tt>,'exclude'</tt>) to the end of it followed by the category ID, e.g to exclude category ID 13</p>
<pre>$cat_args = "orderby=name&amp;show_count={$c}&amp;hierarchical={$h}&amp;exclude=13";</pre>
<p>WordPress 2.7.1 :</p>
<pre>$cat_args = array('orderby' =&gt; 'name', 'show_count' =&gt; $c, 'hierarchical' =&gt; $h, 'exclude' =&gt; '13');</pre>
<p>to exclude multiple categories, enter the ID separated by commas (,). e.g exclude category ID&#8217;s 5, 6, &amp; 7</p>
<pre>$cat_args = "orderby=name&amp;show_count={$c}&amp;hierarchical={$h}&amp;exclude=5,6,7";</pre>
<h2>Summary</h2>
<p>You should now be set, I know there are a number of steps involved, but I hope you agree it&#8217;s well worth it. I know have a glossary that is managed by WordPress. All I need to do is create a new post and assign it to the glossary category, and I can manage the definitions as I would any other post within WordPress.</p>
<p align="center"><a title="WP-SNAP! Configuration" href="http://www.grapii.com/wp-content/uploads/2008/02/wp-snap-configuration.jpg" rel="lightbox[73]"><img src="http://www.grapii.com/wp-content/uploads/2008/02/wp-snap-configuration-150x150.jpg" alt="WP-SNAP! Configuration" /></a></p>
<p align="center"><a title="Grapii Glossary" href="http://www.grapii.com/wp-content/uploads/2008/02/grapii-glossary.jpg" rel="lightbox[73]"><img src="http://www.grapii.com/wp-content/uploads/2008/02/grapii-glossary-150x150.jpg" alt="Grapii Glossary" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.grapii.com/2008/02/create-a-glossary-with-wordpress/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Change Default Thumbnail Size in WordPress</title>
		<link>http://www.grapii.com/2008/02/change-default-thumbnail-size-in-wordpress/</link>
		<comments>http://www.grapii.com/2008/02/change-default-thumbnail-size-in-wordpress/#comments</comments>
		<pubDate>Wed, 27 Feb 2008 13:48:55 +0000</pubDate>
		<dc:creator>grapii</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.grapii.com/?p=29</guid>
		<description><![CDATA[I&#8217;ve been using WordPress for a few weeks now, and thinks it&#8217;s an awesome blogging tool, however, as with most applications it doesn&#8217;t do exactly what I want it to do.  One of the annoyances I have right now, is that the thumbnail image WordPress 2.3 creates is too small for my tastes and [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using <a target="_blank" href="http://www.wordpress.org" title="WordPress">WordPress</a> for a few weeks now, and thinks it&#8217;s an awesome blogging tool, however, as with most applications it doesn&#8217;t do exactly what I want it to do.  One of the annoyances I have right now, is that the thumbnail image WordPress 2.3 creates is too small for my tastes and so I wanted to find a way to change this. It is actually quite easy to change &#8211; it just requires modification to one WordPress file.<span id="more-29"></span></p>
<p>Open /wp-admin/includes/image.php and look for the following code:</p>
<pre>$max_side = apply_filters( 'wp_thumbnail_max_side_length', 128, $attachment_id, $file );</pre>
<p>The number specified here (128 by default) is the maximum size of either dimension.  Just change this to whatever you like.  I&#8217;ve changed this to 256 and works really well (below)</p>
<p style="text-align: center"><a href="http://www.grapii.com/wp-content/uploads/2008/02/canyon.jpg" title="Canyon" rel="lightbox[29]"><img src="http://www.grapii.com/wp-content/uploads/2008/02/canyon-150x150.jpg" alt="Canyon" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.grapii.com/2008/02/change-default-thumbnail-size-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
