<?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>33dots &#187; Wordpress</title>
	<atom:link href="http://www.33dots.com/index.php/category/wordpress/feed" rel="self" type="application/rss+xml" />
	<link>http://www.33dots.com</link>
	<description></description>
	<lastBuildDate>Thu, 09 Sep 2010 05:19:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.3</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Wordpress error &#8220;Is its parent directory writable by the server?&#8221;</title>
		<link>http://www.33dots.com/index.php/web/wordpress-error-is-its-parent-directory-writable-by-the-server.html</link>
		<comments>http://www.33dots.com/index.php/web/wordpress-error-is-its-parent-directory-writable-by-the-server.html#comments</comments>
		<pubDate>Thu, 26 Aug 2010 09:29:36 +0000</pubDate>
		<dc:creator>tony</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.33dots.com/?p=271</guid>
		<description><![CDATA[I was not able to upload images to my wordpress post after i transferred my entire wordpress to a new host. The error returned was
&#8220;Unable to create directory /blog/wp-content/uploads/2010/xx. Is its parent directory writable by the server?&#8221;
Tried changing the permission of the wp-content folder and its subdirectories to 775 and then to 777.
[jaguars]$ chmod -R [...]]]></description>
			<content:encoded><![CDATA[<p>I was not able to upload images to my wordpress post after i transferred my entire wordpress to a new host. The error returned was<br />
<em>&#8220;Unable to create directory /blog/wp-content/uploads/2010/xx. Is its parent directory writable by the server?&#8221;</em></p>
<p>Tried changing the permission of the <em>wp-content</em> folder and its subdirectories to <code>775</code> and then to <code>777</code>.</p>
<pre>[jaguars]$ chmod -R 775 wp-content/
......
......
[jaguars]$ chmod -R 777 wp-content/</pre>
<p>But both didnt work.. <img src='http://www.33dots.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>Next,<br />
The wordpress upload folder was set to <em>/blog/wp-content/uploads</em> in the<em> Settings > Miscellaneous</em><br />
Changed this to <em>blog/wp-content/uploads</em> (removed the &#8216;/&#8217; before blog)<br />
Now uploading works, but still there was a problem. The files are uploaded and saved to new folder <em>/blog/blog/wp-content/uploads</em> [two '<em>blog</em>' in the path.]</p>
<p>Finally, changed the upload folder to <em>wp-content/uploads</em> in the <em>Settings > Miscellaneous</em><br />
Everything works perfect now.</p>
<p>I changed back the permission setting to <code>755</code></p>
<pre>[jaguars]$ chmod -R 755 wp-content/ </pre>
<p>I guess the misconfiguration happend because, in my earlier installation, wordpress was installed into <em>root</em>. and in here to the <em>/blog</em> directory. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.33dots.com/index.php/web/wordpress-error-is-its-parent-directory-writable-by-the-server.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Displaying posts in a category as a page in wordpress</title>
		<link>http://www.33dots.com/index.php/wordpress/displaying-posts-in-a-category-as-a-page-in-wordpress.html</link>
		<comments>http://www.33dots.com/index.php/wordpress/displaying-posts-in-a-category-as-a-page-in-wordpress.html#comments</comments>
		<pubDate>Thu, 06 Aug 2009 10:32:20 +0000</pubDate>
		<dc:creator>tony</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[category as page]]></category>
		<category><![CDATA[page template]]></category>

		<guid isPermaLink="false">http://www.33dots.com/?p=143</guid>
		<description><![CDATA[In this site the Life page only displays the posts in the category Life.
I did this in a manual way by creating a Page Template for the Life page. This gives you more control. The problem with this approach is that you have to do it again for a new theme.
In wordpress, individual pages can [...]]]></description>
			<content:encoded><![CDATA[<p>In this site the <a title="Life page" href="/index.php/life" target="_self">Life</a> page only displays the posts in the category <a title="Category page of Life" href="/index.php/category/life" target="_self">Life</a>.<br />
I did this in a manual way by creating a Page Template for the Life page. This gives you more control. The problem with this approach is that you have to do it again for a new theme.</p>
<p>In wordpress, individual pages can be set to use a specific custom Page Template (a PHP template file, e.g., <em>life.php</em>) that we create within our Theme. The custom Page Template can be assigned while creating a new page. This new Page Template will then override the default <em>page.php</em> Page Template in the Theme.<br />
When loading a page, wordpress looks first for the assigned Page template, then the <em>page.php</em> and finally the <em>index.php</em>. The first one it finds will be used to display that Page. The template pages are situated in the theme&#8217;s directory which is at <em>wp-content/themes/your-theme</em></p>
<p>In our case we need a Page Template that will be similar to the home page but displays only the posts in the required category.<br />
So we will base our custom Page Template on index.php which is the Page Template of the home page.</p>
<p>We make a copy of  the <em>index.php</em> with the name <em>mypage.php</em> (or <em>anything.php</em>)</p>
<p>Add the following code to the top of it so that wordpress understands that it is a Page Template and identify its Template Name. This name will be displayed in the theme editor page.</p>
<pre>&lt;?php
/*
Template Name: MyPage
*/
?&gt;</pre>
<p>Now, we add the filter to display only the required category. This should be added just after the above Template Name code</p>
<pre>&lt;?php
if (is_home()) {
query_posts($query_string."&amp;cat=3");
}
?&gt;</pre>
<p>In this code we display only category with id 3. The <em>category id</em> can be found out from the wordpress <em>Edit Category</em> pages by mouse hovering the required category and its id will be shown in the browser&#8217;s status bar.<br />
Now to display more than one category use some thing like this<br />
<code>query_posts($query_string."&amp;cat=2,6,17,38");</code></p>
<p>Create a blank page and assign this custom template to it. [Look for a drop-down labeled "<em>Page Template</em>" towards the bottom]</p>
<p>Thats all!</p>
<p>For more detailed information on Page Templates, visit this <a title="Page Templates in wordpress codex site" href="http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates" target="_self">wordpress codex page</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.33dots.com/index.php/wordpress/displaying-posts-in-a-category-as-a-page-in-wordpress.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Excluding a category from the front page in Wordpress</title>
		<link>http://www.33dots.com/index.php/wordpress/excluding-a-category-from-the-front-page-in-wordpress.html</link>
		<comments>http://www.33dots.com/index.php/wordpress/excluding-a-category-from-the-front-page-in-wordpress.html#comments</comments>
		<pubDate>Thu, 06 Aug 2009 09:42:58 +0000</pubDate>
		<dc:creator>tony</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[query_posts]]></category>
		<category><![CDATA[wordpress category]]></category>

		<guid isPermaLink="false">http://www.33dots.com/?p=129</guid>
		<description><![CDATA[This is a very well known trick where we use the query_posts() template tag to control which posts to show up. The code has to be placed above the Loop in the index.php template file.
&#60;?php
if (is_home()) {
query_posts("cat=-3");
}
?&#62;
The code checks whether we are in home page and if it is, it excludes the category with id [...]]]></description>
			<content:encoded><![CDATA[<p>This is a very well known trick where we use the <code>query_posts()</code> template tag to control which posts to show up. The code has to be placed above the <a title="Description of the Loop in wordpress site" href="http://codex.wordpress.org/The_Loop" target="_self"><em>Loop</em></a> in the <em>index.php</em> template file.</p>
<pre>&lt;?php
if (is_home()) {
query_posts("cat=-3");
}
?&gt;</pre>
<p>The code checks whether we are in home page and if it is, it excludes the category with id 3 from displaying in it. The <em>category id</em> can be found out from the wordpres&#8217;s <em>Edit Category</em> pages by mouse hovering the required category and its id will be shown in the browser&#8217;s status bar.<br />
More than one category could be excluded by using a code like this, <code>query_posts("cat=-2,-6,-8")</code></p>
<p>However, i recently noticed that it breaks the pagination, and so the <em>next</em> and <em>previous </em>page links at the bottom only shows the same home page. Pagination is the feature by which we split the home page into pages based on the max number of posts that can be displayed in the page.</p>
<p>The problem was because, the call to <code>query_posts()</code> causes the <code>wp_query</code> object to generate a new SQL query using our parameters and ignores the other parameters it receives via the URL (page number etc).</p>
<p>The proper way is to send the parameters in the URL together with our parameters and this can be done by including the variable <code>$query_string</code> in the call to <code>query_posts()</code>. When doing this way the quoted portion of the argument must begin with an ampersand (&amp;).<br />
The code now looks like this</p>
<pre>&lt;?php
if (is_home()) {
query_posts($query_string."&amp;cat=-3");
}
?&gt;</pre>
<p>Another technique is to use a code like this inside the Loop. <code><br />
&lt;?php if (in_category('3') &amp;&amp; is_home() ) continue; ?&gt;</code><br />
I&#8217;ve not tested this code myself, but looking at it i think it should work fine.</p>
<p>For a detailed information on what the <code>query_posts()</code> is capable of doing, visit this <a title="Wordpress codex page on query_posts()" href="http://codex.wordpress.org/Template_Tags/query_posts" target="_self">wordpress codex page</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.33dots.com/index.php/wordpress/excluding-a-category-from-the-front-page-in-wordpress.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
