<?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>I dream in colors &#187; WordPress</title>
	<atom:link href="http://idreamincolors.com/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://idreamincolors.com</link>
	<description>...even when i'm awake</description>
	<lastBuildDate>Wed, 08 Sep 2010 03:40:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Recent posts on Wordpress</title>
		<link>http://idreamincolors.com/2007/08/recent-posts-on-wordpress/</link>
		<comments>http://idreamincolors.com/2007/08/recent-posts-on-wordpress/#comments</comments>
		<pubDate>Tue, 21 Aug 2007 14:16:39 +0000</pubDate>
		<dc:creator>Nico</dc:creator>
				<category><![CDATA[Webdesign]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://idreamincolors.com/2007/08/recent-posts-on-wordpress/</guid>
		<description><![CDATA[One of the best Recent Posts plugins for Wordpress out there is the Coffe2Code Customizable Post Listings. In fact, it does much more. &#8220;Display Recent Posts, Recently Commented Posts, Recently Modified Posts, Random Posts, and other post listings&#8230;&#8221;. Neat.
But, since Wordpress 2.1, there&#8217;s a slight problem with it. You see, WP 2.1 changed the way [...]]]></description>
			<content:encoded><![CDATA[<p>One of the best Recent Posts plugins for Wordpress out there is the <a href="http://www.coffee2code.com/archives/2004/08/27/plugin-customizable-post-listings/">Coffe2Code Customizable Post Listings</a>. In fact, it does much more. &#8220;Display Recent Posts, Recently Commented Posts, Recently Modified Posts, Random Posts, and other post listings&#8230;&#8221;. Neat.</p>
<p>But, since Wordpress 2.1, there&#8217;s a slight problem with it. You see, <a href="http://www.transycan.net/blogtest/2007/01/23/how-pages-are-different-in-wp-21/">WP 2.1 changed the way Pages work</a>, so this nifty plugin now fails to tell the difference between posts and Pages. It may not be too much of a problem in some cases, but in this particular site I&#8217;m currently working on it gets in the way. Fortunately, there&#8217;s an easy fix.</p>
<p>All that needs to be added is this little snippet of code that tells the plugin to only process the posts and not the Pages: <i>post_type=&#8217;post&#8217;</i>. One doesn&#8217;t need to know PHP to do this (I don&#8217;t&#8230;). Copy and paste will do.</p>
<p>Look for this:<br/></br><br />
<i>$sql .= &#8220;WHERE $tableposts.post_date <= '$now' AND ( $tableposts.post_status = 'publish' ";<br />
	if ($include_sticky_posts) $sql .= "OR $tableposts.post_status = 'sticky' ";<br />
	$sql .= ")";</i><br/><br/><br />
and add the bit of code mentioned before, like this:<br/><br/><br />
<i>$sql .= &#8220;WHERE $tableposts.post_date <= '$now' AND ( $tableposts.post_status = 'publish' ";<br />
	if ($include_sticky_posts) $sql .= "OR $tableposts.post_status = 'sticky' ";<br />
	$sql .= ") AND <b>$tableposts.post_type=&#8217;post&#8217;</b> &#8220;;</i><br/>
</p>
<p>Now it works like a charm :).</p>
<p>Unfortunately this pluging hasn&#8217;t been updated in a few years, and even the last comment about it on the website is from 2005. At least this will leave them a pingback.</p>
<p>Technorati Tags: <a href="http://technorati.com/tag/Wordpress" rel="tag">Wordpress</a>, <a href="http://technorati.com/tag/Coffee2Code" rel="tag"> Coffee2Code</a>, <a href="http://technorati.com/tag/Customizable+Post+Listings" rel="tag"> Customizable Post Listings</a>, <a href="http://technorati.com/tag/Wordpress+plugin" rel="tag"> Wordpress plugin</a>, <a href="http://technorati.com/tag/Wordpress+recent+posts" rel="tag"> Wordpress recent posts</a></p>
]]></content:encoded>
			<wfw:commentRss>http://idreamincolors.com/2007/08/recent-posts-on-wordpress/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Buggy WP 2.1 tags</title>
		<link>http://idreamincolors.com/2007/03/buggy-wp-21-tags/</link>
		<comments>http://idreamincolors.com/2007/03/buggy-wp-21-tags/#comments</comments>
		<pubDate>Sun, 11 Mar 2007 21:34:24 +0000</pubDate>
		<dc:creator>Nico</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://idreamincolors.com/2007/03/buggy-wp-21-tags/</guid>
		<description><![CDATA[wp_list_bookmarks is a new tag in Wordpress 2.1 that replaces the tags get_links_list and get_links tags, and is the one that&#8217;s giving me the more trouble. The documentation page is still a &#8220;rough draft&#8221;, and the tag itself is bugged (there are a few bug reports filed already).
One thing that I couldn&#8217;t do to save [...]]]></description>
			<content:encoded><![CDATA[<p><b>wp_list_bookmarks</b> is a new tag in Wordpress 2.1 that replaces the <i>tags get_links_list</i> and <i>get_links</i> tags, and is the one that&#8217;s giving me the more trouble. The <a href="http://codex.wordpress.org/Template_Tags/wp_list_bookmarks">documentation page</a> is still a &#8220;rough draft&#8221;, and the tag itself is bugged (there are a few bug reports filed already).</p>
<p>One thing that I couldn&#8217;t do to save my life is display the links list without a title. You used to have to use the parameter <i>&#8216;title_li=&#8217;</i>, wich is supposed to still work. Anyone who has tried will tell you that it doesn&#8217;t work so well.Took me a while, but after some searching I found a workaround for it. If you pass the <i>&#8216;title_li=&#8217;</i> parameter alone, it won&#8217;t work. You also have to add <i>&#8216;categorize=0&#8242;</i></p>
<p>Now, by doing this you&#8217;re passing a false value to this parameter, whose description is&#8221;Bookmarks should be shown within their assigned Categories&#8221;. I think that using a value of 1 should work too if that&#8217;s what&#8217;s needed, but I haven&#8217;t tried that yet.</p>
<p>Technorati Tags: <a href="http://technorati.com/tag/wordpress+2.1" rel="tag">wordpress 2.1</a>, <a href="http://technorati.com/tag/wordpress+2.1+bugs" rel="tag"> wordpress 2.1 bugs</a>, <a href="http://technorati.com/tag/wp_list_bookmarks" rel="tag"> wp_list_bookmarks</a></p>
]]></content:encoded>
			<wfw:commentRss>http://idreamincolors.com/2007/03/buggy-wp-21-tags/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wordpress 2.1</title>
		<link>http://idreamincolors.com/2007/02/wordpress-21/</link>
		<comments>http://idreamincolors.com/2007/02/wordpress-21/#comments</comments>
		<pubDate>Thu, 08 Feb 2007 00:27:01 +0000</pubDate>
		<dc:creator>Nico</dc:creator>
				<category><![CDATA[Ramblings]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://idreamincolors.com/2007/02/wordpress-21/</guid>
		<description><![CDATA[Am I the only one having problems with WP 2.1? I would have two themes finished by now if it wasn&#8217;t for the new freaking version of Wordpress not doing what it should do. Tags aren&#8217;t working like they should according to the (incomplete) documentation, breaking themes and driving me insane. And still I keep [...]]]></description>
			<content:encoded><![CDATA[<p>Am I the only one having problems with WP 2.1? I would have two themes finished by now if it wasn&#8217;t for the new freaking version of Wordpress not doing what it should do. Tags aren&#8217;t working like they should according to the (incomplete) documentation, breaking themes and driving me insane. And still I keep reading how well this new version is working for everyone else. Sheesh.</p>
<p>Technorati Tags: <a href="http://technorati.com/tag/wordpress+2.1" rel="tag">wordpress 2.1</a>, <a href="http://technorati.com/tag/wordpress+2.1+problems" rel="tag"> wordpress 2.1 problems</a></p>
]]></content:encoded>
			<wfw:commentRss>http://idreamincolors.com/2007/02/wordpress-21/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Wordpress: user-editable menu with images</title>
		<link>http://idreamincolors.com/2006/10/wordpress-user-editable-menu-with-images/</link>
		<comments>http://idreamincolors.com/2006/10/wordpress-user-editable-menu-with-images/#comments</comments>
		<pubDate>Mon, 16 Oct 2006 04:01:43 +0000</pubDate>
		<dc:creator>Nico</dc:creator>
				<category><![CDATA[Webdesign]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://idreamincolors.com/2006/10/wordpress-user-editable-menu-with-images/</guid>
		<description><![CDATA[A client asked me for a navigation bar using a custom font for his WordPress theme. I couldn&#8217;t just hand code it and use images since he wanted the final user to be able to add pages from the WP control panel. I figured there had to be a way to do that; there is [...]]]></description>
			<content:encoded><![CDATA[<p>A client asked me for a navigation bar using a custom font for his WordPress theme. I couldn&#8217;t just hand code it and use images since he wanted the final user to be able to add pages from the WP control panel. I figured there had to be a way to do that; there is a plugin to replace the post titles with images (gee, can you tell?), so why couldn&#8217;t you use it for any other text? It took me a while, but i finally figured it out. This is what i did:</p>
<p>I made a menu on the header with the <strong>wp_list_pages</strong> tag.</p>
<p><code>&lt;div id=&quot;menu&quot;&gt;<br />
&lt;ul&gt;<br />
&lt;?php wp_list_pages('title_li='); ?&gt;<br />
&lt;/ul&gt;<br />
&lt;/div&gt;</code></p>
<p><strong>title_li=</strong> makes the tag not display a title.</p>
<p>The menu is done, next is converting it to images. I started by getting this <a href="http://blog.slaven.net.au/wordpress-plugins/image-replacement-wordpress-plugin/">Image Replacement WordPress plugin</a>. I had to fix it to get it to work properly. On that page look for a comment by Serge Lafont. I tried that and it worked like a charm.</p>
<p>The plugin lets you specify wich html tag you want to replace (<strong>h1, h2, h3, h4, h5, h6, div, span </strong>and<strong> p</strong>), and even set a class. The problem is that the <strong>wp_list_cats</strong> tag outputs something like this:</p>
<p><code>&lt;li class=&quot;page_item&quot;&gt;&lt;a href=&quot;...url...&quot; title=&quot;Links&quot;&gt;Links&lt;/a&gt;&lt;/li&gt;</code></p>
<p>No good. I needed a tag around the page title. I had to change the output of the <strong>wp_list_pages</strong> tag, wich is found in the the template-function-posts.php file (on the wp-includes folder).</p>
<p>I had to look around a bit, as php is not really my thing, but i found the part that had to be changed. To locate it, do a search for &#8220;function _page_level_out&#8221; and scroll down a few lines. The part is this:</p>
<p><code>$output .= $indent . '<br />
<br />&lt;li class=&quot;' . $css_class . '&quot;&gt;&lt;a href=&quot;' . get_page_link($page_id) . '&quot; title=&quot;' . wp_specialchars($title) . '&quot;&gt;' . $title . '&lt;/a&gt;';</code></p>
<p>I added a span there, like this:</p>
<p><code>$output .= $indent . '<br />
<br />&lt;li class=&quot;' . $css_class . '&quot;&gt;&lt;a href=&quot;' . get_page_link($page_id) . '&quot; title=&quot;' . wp_specialchars($title) . '&quot;&gt;&lt;span class=&quot;' . $css_class . '&quot;&gt;' . $title . '&lt;/span&gt;&lt;/a&gt;';</code></p>
<p>I copied the class from the li element, so they&#8217;ll both have the same class. Any other one class could be used too though.</p>
<p>Now the <strong>wp_list_pages</strong> tag outputs this:</p>
<p><code>&lt;li class=&quot;page_item&quot;&gt;&lt;a href=&quot;...url...&quot; title=&quot;Links&quot;&gt;&lt;span class=&quot;page_item&quot;&gt;Links&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;</code></p>
<p>Perfect. And there is no problem if you want to use another theme in the future. All you have is an extra span tag that won&#8217;t bug.</p>
<p>All left to do is go to the plugin settings and choose a span class &#8220;page_item&#8221;, and voila, an image menu, fully editable. So far it works fine, at least in IE6, Opera 9 and Firefox 1.5 (all for WinXP).</p>
<p>The only drawback is that you can&#8217;t have mouseover effects. Oh well.</p>
<p>Technorati Tags: <a href="http://technorati.com/tag/Wordpress" rel="tag">Wordpress</a>, <a href="http://technorati.com/tag/Wordpress+hack" rel="tag"> Wordpress hack</a></p>
]]></content:encoded>
			<wfw:commentRss>http://idreamincolors.com/2006/10/wordpress-user-editable-menu-with-images/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
