<?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>Paintbits &#187; Wordpress</title>
	<atom:link href="http://www.paintbits.com/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.paintbits.com</link>
	<description>Life in Colors</description>
	<lastBuildDate>Sun, 15 Jan 2012 01:54:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Is WordPress Killing Web Design?</title>
		<link>http://www.paintbits.com/webdesign/is-wordpress-killing-web-design/</link>
		<comments>http://www.paintbits.com/webdesign/is-wordpress-killing-web-design/#comments</comments>
		<pubDate>Mon, 31 Jan 2011 12:23:47 +0000</pubDate>
		<dc:creator>greven</dc:creator>
				<category><![CDATA[Webdesign]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.paintbits.com/?p=4831</guid>
		<description><![CDATA[Webdesign Tuts+ has a nice article regarding SXSW and the subject Is WordPress Killing Web Design? What&#8217;s your thoughts on the subject? I&#8217;ve done my fair share part of WordPress designs and I do understand the question and it&#8217;s quite pertinent but I don&#8217;t agree with it. I don&#8217;t consider myself a designer, just a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="Is WordPress Killing Web Design?"><img src="http://www.paintbits.com/wp-content/uploads/2011/01/Wordpress.jpg" alt="" title="Wordpress" width="510" height="140" class="aligncenter size-full wp-image-4832" /></a></p>
<p>Webdesign Tuts+ has a nice article regarding <a href="http://sxsw.com/">SXSW</a> and the subject <a href="http://webdesign.tutsplus.com/videos/lectures/sxswi-2010-is-wordpress-killing-web-design/">Is WordPress Killing Web Design?</a> What&#8217;s your thoughts on the subject? I&#8217;ve done my fair share part of WordPress designs and I do understand the question and it&#8217;s quite pertinent but I don&#8217;t agree with it. I don&#8217;t consider myself a designer, just a coder who likes design and beautiful things (who doesn&#8217;t?) but I do think the tools don&#8217;t make the artist and at the bottom line WordPress is just a tool to simplify the implementation of dynamic website (is there still static html webpages in the 21st century?).<br />
<span id="more-4831"></span><br />
Wordpress is not a true <abbr title="Content Management Suite">CMS</abbr> but it&#8217;s a powerful framework that can be moulded into one. The WordPress background is from a blog engine and therefor is it&#8217;s more often used. The &#8220;blog design&#8221; works, blogs are popular these days and most of them don&#8217;t want to break the mould that works. People are used to this kind of navigation. But this doesn&#8217;t mean that if you want to design something more unique using WordPress that you can&#8217;t reach that goal. You can, WordPress doesn&#8217;t limit you in any ways, only your imagination does.</p>
<p><strong>Link</strong>: <a href="http://www.youtube.com/embed/ZUD3qUtT3go">SXSW 2010 Video: Is WordPress Killing Web Design?</a><br />
<strong>Source</strong>: <a href="http://webdesign.tutsplus.com/videos/lectures/sxswi-2010-is-wordpress-killing-web-design/">SXSWi 2010: Is WordPress Killing Web Design?</a></p>
<p>So my answer is no, but I do understand the pertinence of the question. <!-- PHP 5.x --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.paintbits.com/webdesign/is-wordpress-killing-web-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress 3.0 Released</title>
		<link>http://www.paintbits.com/wordpress/wordpress-3-0-released/</link>
		<comments>http://www.paintbits.com/wordpress/wordpress-3-0-released/#comments</comments>
		<pubDate>Fri, 18 Jun 2010 04:17:44 +0000</pubDate>
		<dc:creator>greven</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.paintbits.com/?p=4753</guid>
		<description><![CDATA[And Paintbits is already running it! WordPress 3.0, the thirteenth major release of WordPress and one must give credits to the developers and contributors, each major version has always brought something new and unique to make WordPress the definite open source website/blog engine for developers and bloggers all over the World. What&#8217;s new in WordPress [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.paintbits.com/wp-content/uploads/2010/06/WordPress-3.jpg" alt="WordPress 3" title="WordPress 3" width="510" height="140" class="aligncenter size-full wp-image-4757" /></p>
<p>And <a href="http://www.paintbits.com">Paintbits</a> is already running it! WordPress 3.0, the thirteenth major release of WordPress and one must give credits to the developers and contributors, each major version has always brought something new and unique to make WordPress the definite <strong>open source</strong> website/blog engine for developers and bloggers all over the World.<span id="more-4753"></span></p>
<h3>What&#8217;s new in WordPress 3.0</h3>
<p>3.0 is a new milestone for WordPress and even though most juicy changes should please the power users more than the casual blogger, the inclusion of a new default theme should be strong enough argument for many to change to the newest version (and you should always keep your WordPress website upgrade for <strong>security</strong> reasons).</p>
<p>The new Features Highlight taken from <a href="http://www.wordpress.org/">WordPress.org</a>.</p>
<ul>
<li>WordPress and WordPress MU have merged, allowing the management of multiple sites (called Multisite) from one WordPress installation.</li>
<li>New default theme &#8220;Twenty Ten&#8221; takes full advantage of the current features of WordPress.</li>
<li>New custom menu management feature, allows creation of custom menus combining posts, pages, categories, tags, and links for use in theme menus or widgets.</li>
<li>Custom header and background APIs.</li>
<li>Contextual help text accessed under the Help tab of every screen in the WordPress administration.</li>
<li>Ability to set the admin username and password during installation.</li>
<li>
Bulk updating of themes with an automatic maintenance mode during the process.</li>
<li>Support for shortlinks.</li>
<li>Improved Custom post types and custom taxonomies including hierarchical (category-style) support. (Try the Custom Post Type UI or GD Custom Posts And Taxonomies Tools plugins to see the possibilities.)</li>
<li>A lighter admin color scheme to increase accessibility and put the focus more squarely on your content.</li>
</ul>
<p>You can see the full feature list <a href="http://codex.wordpress.org/Version_3.0">here</a>.</p>
<p>I have to say I enjoy the new admin theme a lot more than the old one. It&#8217;s lighter, cleaner, a more solid theme overhaul.</p>
<p>I&#8217;m thinking in re-doing Paintbits theme again. Developing maybe a premium version of the theme to put up on <a href="http://themeforest.net/?ref=greven">ThemeForest</a> and offer this current one for free.</p>
<h3>WordPress 3.0 Official Video</h3>
<p><embed src="http://v.wordpress.com/wp-content/plugins/video/flvplayer.swf?ver=1.21" type="application/x-shockwave-flash" width="510" height="286" wmode="transparent" seamlesstabbing="true" allowfullscreen="true" allowscriptaccess="always" overstretch="true" flashvars="guid=BQtfIEY1&amp;width=640&amp;height=360&amp;locksize=no&amp;dynamicseek=false&amp;qc_publisherId=p-18-mFEk4J448M" title="Introducing WordPress 3.0 &quot;Thelonious&quot;"></embed></p>
<p>Justin Tadlock as a really nice post about <a href="http://justintadlock.com/archives/2010/03/24/looking-forward-to-wordpress-3-0">WordPress 3.0 Features</a>.<br />
<!-- PHP 5.x --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.paintbits.com/wordpress/wordpress-3-0-released/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>QuickTip: Manually Set WordPress Theme</title>
		<link>http://www.paintbits.com/wordpress/quicktip-manually-set-wordpress-theme/</link>
		<comments>http://www.paintbits.com/wordpress/quicktip-manually-set-wordpress-theme/#comments</comments>
		<pubDate>Sat, 22 May 2010 17:35:13 +0000</pubDate>
		<dc:creator>greven</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.paintbits.com/?p=4719</guid>
		<description><![CDATA[The other day I couldn&#8217;t access my admin panel on my blog Massivo. Turns out I damaged the database with a well executed WordPress Hook. I couldn&#8217;t do anything because I just couldn&#8217;t log into the WordPress Admin area. The only thing that &#8220;saved me&#8221; was using a SQL Command using phpMyAdmin. So if you [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.paintbits.com/wp-content/uploads/2010/05/WordPress.jpg" alt="WordPress" title="WordPress" width="510" height="140" class="aligncenter size-full wp-image-4756" /></p>
<p>The other day I couldn&#8217;t access my admin panel on my blog <a href="http://massivo.net/">Massivo</a>. Turns out I damaged the database with a well executed WordPress Hook. I couldn&#8217;t do anything because I just couldn&#8217;t log into the WordPress Admin area. The only thing that &#8220;<strong>saved me</strong>&#8221; was using a SQL Command using phpMyAdmin. <span id="more-4719"></span></p>
<p>So if you happen to be stuck in a situation like that and need to reset the WordPress theme to the default one, follow the next easy steps.</p>
<pre class="brush: sql">
-- Manually Set WordPress Theme by Going to your phpMyAdmin
-- Selecting the Desired Database in the SQL Tab, select each of the below lines individually and execute each of them.
update wp_options set option_value = &#039;default&#039; where option_name = &#039;template&#039;
update wp_options set option_value = &#039;default&#039; where option_name =&#039;stylesheet&#039;
</pre>
<p><!-- PHP 5.x --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.paintbits.com/wordpress/quicktip-manually-set-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress: Display different number of pages on Archives</title>
		<link>http://www.paintbits.com/wordpress/wordpress-display-different-number-of-pages-on-archives/</link>
		<comments>http://www.paintbits.com/wordpress/wordpress-display-different-number-of-pages-on-archives/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 12:19:08 +0000</pubDate>
		<dc:creator>greven</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.paintbits.com/?p=4661</guid>
		<description><![CDATA[I&#8217;m working on a little project to be released in the next weeks. Because of this I&#8217;ve been improving my WordPress knowledge quite a bit. The website will be a News / Articles type of site. I intended to have 6 posts on the front page, something you can control under the WordPress Options in [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://wp.me/pdExi-1db"><img src="http://www.paintbits.com/wp-content/uploads/2010/04/WordPress-Different-Pages-on-Archives.jpg" alt="Wordpress Different Pages on Archives" title="Wordpress Different Pages on Archives" width="510" height="140" class="aligncenter size-full wp-image-4663" /></a></p>
<p>I&#8217;m working on a little project to be released in the next weeks. Because of this I&#8217;ve been improving my <a href="http://wordpress.org/">WordPress</a> knowledge quite a bit. The website will be a News / Articles type of site. I intended to have 6 posts on the front page, something you can control under the <strong>WordPress</strong> <strong>Options</strong> in <strong>Settings</strong> > <strong>Reading</strong>.<br />
<span id="more-4661"></span><br />
I wanted to make the archives behave differently from the Index, that is, display a different amount of posts. I stilled them differently so it only made sense to have a larger amount of posts when you clicked a category, tag, etcetera. This seemed a very easy task to achieve, I though of using <a href="http://codex.wordpress.org/Function_Reference/query_posts">query_posts()</a> with the argument <strong>&#8216;posts_per_page = 10&#8242;</strong>, like: <strong>query_posts(&#8216;posts_per_page=10&#8242;);</strong>. It worked, I had now 10 posts per page when displaying the archives, but it was working badly, it displayed all posts not just the desired category, tag, etc. As usual I&#8217;ve Google to work to find a solution. I did find a lot of people with similar problems, hell I even found WordPress <a href="http://wordpress.org/extend/plugins/query-posts/">Plugins for the Query_Post</a>. What I didn&#8217;t remember to do was <a href="http://en.wikipedia.org/wiki/RTFM">RTFM</a>. Don&#8217;t get me wrong, I use the <a href="http://codex.wordpress.org/">WordPress Codex</a> all the time, but in this case I didn&#8217;t think it would cover such a specific &#8220;problem&#8221;. It did, you can find the solution in the Codex but I&#8217;ll leave it here for future reference if anyone has the same problem as I did.</p>
<p>Basically what we want to do is do a different query, using <strong>query_posts()</strong> but still retain the ability from the loop to get the parameters from the URL (the category, tag&#8230;). What we do is use the $query_string global variable in the call to query_posts().</p>
<p>In my example:</p>
<pre class="brush: php">
&lt; ?php
 global $query_string;
 query_posts(&#039;$query_string . posts_per_page=8&#039;);
 while (have_posts()) : the_post(); ?&gt;

(... the loop ...)
</pre>
<p>With <strong>global $query_string</strong> your archives will work the intended way and you can still do a different query with <strong>query_posts()</strong> to display a different amount of posts. Hope this quick tip can help you in your future WordPress endeavors.</p>
<p><strong>PS</strong> &#8211; And yes, the post image is the preview of the project I&#8217;m working on.<!-- PHP 5.x --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.paintbits.com/wordpress/wordpress-display-different-number-of-pages-on-archives/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Display your WordPress blog Statistics</title>
		<link>http://www.paintbits.com/webdesign/display-your-wordpress-blog-statistics/</link>
		<comments>http://www.paintbits.com/webdesign/display-your-wordpress-blog-statistics/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 01:00:09 +0000</pubDate>
		<dc:creator>greven</dc:creator>
				<category><![CDATA[Webdesign]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.paintbits.com/?p=3965</guid>
		<description><![CDATA[One of the things I wanted to implement in my new website theme, was the display of the blog statistics. After the code snippet to display recent comments without a plugin, I really wanted to give something new to my footer. There are several reasons why you should want to display your website statistics. First [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.paintbits.com/wp-content/uploads/2009/09/WordPress-Recent-Comments-Without-a-Plugin1.jpg" alt="WordPress Recent-Comments Without a Plugin" title="WordPress Recent-Comments Without a Plugin" width="495" height="150" class="aligncenter size-full wp-image-4768" /></p>
<p>One of the things I wanted to implement in my new website theme, was the display of the <strong>blog statistics</strong>. After the code snippet to <a href="http://www.paintbits.com/wordpress/wordpress-recent-comments-without-plugin/">display recent comments without a plugin</a>, I really wanted to give something new to my footer.<br />
<span id="more-3965"></span><br />
There are several reasons why you should want to display your website statistics. First you might have a page where you display your <strong>blog statistics</strong>, like feed readers, total posts, comments, etc. Instead of updating it manually every couple of months you can have it automated. Or like me, you can display your statistics in the footer or even in your sidebar, for curiosity and/or to show your readers your blog history / performance. Whichever is your reason, having something automated in providing more info to your readers, <strong>enriches your blog</strong>.</p>
<p>The code was very simple to implement, just took me a few visits to the <a href="http://codex.wordpress.org/Main_Page">wordpress codex</a> and to my WordPress database to get the variables I needed. This code is capable of displaying the <strong>Post Count</strong>, <strong>Page Count</strong>, the <strong>Comment Count</strong>, the <strong>Comments Ratio per Post</strong> (Comments / Total Posts) and the <strong>Number of Registered Users</strong>.</p>
<p>To display the number of your RSS Readers, you will need first to write some PHP functions to your wordpress theme file. The file is called <em>functions.php</em>. This was copied from <a href="http://www.wprecipes.com/how-to-display-your-feedburner-count-in-full-text">WPRecepies</a>.</p>
<p>Just insert the code into your <em>functions.php</em> file. Replace Paintbits to your feedburner account name. </p>
<pre class="brush: php">
function RSScount()
{
$fburl=&quot;https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=Paintbits&quot;;
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $fburl);
$stored = curl_exec($ch);
curl_close($ch);
$grid = new SimpleXMLElement($stored);
$rsscount = $grid-&gt;feed-&gt;entry[&#039;circulation&#039;];
return $rsscount;
}
</pre>
<p>Whenever you want to make a call to your RSS Feed count, just write: RSScount(); inside PHP code tags of course. You&#8217;ll see how in the final code. Alternatively to use this code, you can use a plugin like <a href="http://wordpress.org/extend/plugins/feedburner-circulation/">Feedburner Circulation</a>. The advantage is that with a plugin like this you will have cache and error protection on your Feed Count text display.</p>
<p class="download">Download <a href="http://wordpress.org/extend/plugins/feedburner-circulation/">Feedburner Circulation</a></p>
<p>So, now that we can display our Feed Count in full text, we just need to write the other variables assigns to get the rest of our website statistics.</p>
<pre class="brush: php">
&lt; ?php
$count_posts = wp_count_posts();
$posts = $count_posts-&gt;publish; /* Gets the post count */
$count_pages = wp_count_posts(&#039;page&#039;);
$pages = $count_pages-&gt;publish; /* Gets the page count */
$count_comments = get_comment_count();
$comments = $count_comments[&#039;approved&#039;]; /* Gets the approved comment count */
$rss_readers = RSScount(); /* Calls the RSScount function to display your Feed Count */
$user_count = $wpdb-&gt;get_var(&quot;SELECT COUNT(*) FROM $wpdb-&gt;users;&quot;); /* Gets the number of registered users*/
?&gt;
</pre>
<p>In order to display your statistics, you just call and print your variables. This is how I did it in my footer:</p>
<pre class="brush: php">
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;/archives/&quot; title=&quot;Written posts&quot;&gt;Articles&lt;/a&gt;&lt; ?php echo &quot;: &quot;.$posts.&quot;&quot; ?&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;footer_comm_author&quot; title=&quot;Pages published&quot;&gt;Pages&lt;/span&gt;&lt; ?php echo &quot;: &quot;.$pages.&quot;&quot; ?&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;footer_comm_author&quot; title=&quot;User comments&quot;&gt;Comments&lt;/span&gt;&lt; ?php echo &quot;: &quot;.$comments.&quot;&quot; ?&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;footer_comm_author&quot; title=&quot;Comments per Post Ratio&quot;&gt;Comments Ratio&lt;/span&gt;&lt; ?php echo &quot;: &quot;.round($comments/$posts).&quot;&quot; ?&gt;&lt;/li&gt; /* Calculates the Comment Ratio */
&lt;li&gt;&lt;a href=&quot;http://www.paintbits.com/feed&quot; title=&quot;Feed readers&quot;&gt;Readers&lt;/a&gt;&lt; ?php echo &quot;: &quot;.$rss_readers.&quot;&quot; ?&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;footer_comm_author&quot; title=&quot;Registered users&quot;&gt;Members&lt;/span&gt;&lt; ?php echo &quot;: &quot;.$user_count.&quot;&quot; ?&gt;&lt;/li&gt;
&lt;/ul&gt;
</pre>
<p>All put together, this is what I&#8217;ve used in my footer (don&#8217;t forget the RSScount function you need to add to your <em>functions.php</em> theme file):</p>
<pre class="brush: php">
&lt;div class=&quot;footer_stats&quot;&gt;
&lt;h2&gt;Statistics&lt;/h2&gt;
&lt; ?php
$count_posts = wp_count_posts();
$posts = $count_posts-&gt;publish;
$count_pages = wp_count_posts(&#039;page&#039;);
$pages = $count_pages-&gt;publish;
$count_comments = get_comment_count();
$comments = $count_comments[&#039;approved&#039;];
$rss_readers = RSScount();
$user_count = $wpdb-&gt;get_var(&quot;SELECT COUNT(*) FROM $wpdb-&gt;users;&quot;);
?&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;/archives/&quot; title=&quot;Written posts&quot;&gt;Articles&lt;/a&gt;&lt; ?php echo &quot;: &quot;.$posts.&quot;&quot; ?&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;footer_comm_author&quot; title=&quot;Pages published&quot;&gt;Pages&lt;/span&gt;&lt; ?php echo &quot;: &quot;.$pages.&quot;&quot; ?&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;footer_comm_author&quot; title=&quot;User comments&quot;&gt;Comments&lt;/span&gt;&lt; ?php echo &quot;: &quot;.$comments.&quot;&quot; ?&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;footer_comm_author&quot; title=&quot;Comments per Post Ratio&quot;&gt;Comments Ratio&lt;/span&gt;&lt; ?php echo &quot;: &quot;.round($comments/$posts).&quot;&quot; ?&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.paintbits.com/feed&quot; title=&quot;Feed readers&quot;&gt;Readers&lt;/a&gt;&lt; ?php echo &quot;: &quot;.$rss_readers.&quot;&quot; ?&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;footer_comm_author&quot; title=&quot;Registered users&quot;&gt;Members&lt;/span&gt;&lt; ?php echo &quot;: &quot;.$user_count.&quot;&quot; ?&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
</pre>
<p>I can&#8217;t say this enough, <a href="http://codex.wordpress.org/Function_Reference/">WordPress Codex Funtion Reference</a> is one of the best tools you can have when developing new code for your WordPress blog. Explore it a bit and you&#8217;ll probably find what you are looking for. WordPress is amazing and saves you a lot of PHP coding to a lot of commonly used tasks. This is why we all love WordPress.</p>
<p>Hope this is useful to you in some way.<!-- PHP 5.x --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.paintbits.com/webdesign/display-your-wordpress-blog-statistics/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to: Recent Comments without Plugin</title>
		<link>http://www.paintbits.com/wordpress/wordpress-recent-comments-without-plugin/</link>
		<comments>http://www.paintbits.com/wordpress/wordpress-recent-comments-without-plugin/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 00:00:53 +0000</pubDate>
		<dc:creator>greven</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.paintbits.com/?p=3704</guid>
		<description><![CDATA[Displaying a list of recent comments in Wordpress without the use of any pluging. Complete code snippet with css styling example included.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.paintbits.com/wp-content/uploads/2009/09/WordPress-Recent-Comments-Without-a-Plugin.jpg" rel="lightbox[3704]" title="WordPress-Recent-Comments-Without-a-Plugin"><img src="http://www.paintbits.com/wp-content/uploads/2009/09/WordPress-Recent-Comments-Without-a-Plugin.jpg" alt="" title="WordPress-Recent-Comments-Without-a-Plugin" width="495" height="150" class="aligncenter size-full wp-image-4766" /></a></p>
<p>In the ongoing creation  process of the new <a href="http://www.paintbits.com/">Paintbits</a> theme (Lumen v2), I was researching a way to implement some functionality to my footer, but without the use of plugins. One of the features I want displayed in it it&#8217;s some recent comments by the users. I found some solutions, but none satisfied my needs completely.<br />
<span id="more-3704"></span><br />
With the help of the WordPress default files and the <a href="http://codex.wordpress.org/Function_Reference">WordPress Codex</a> and some PHP I ended up with a little code snippet that do exactly what I want: A certain amount of recent comments, filtering the tracbacks and pingbacks, with a preview of the comment when hovering over the link.</p>
<p>The code is fairly simple.</p>
<h4>The Code</h4>
<pre class="brush: php">
&lt;div class=&quot;footer_recent_comments&quot;&gt;
&lt;h2&gt;Recent Comments&lt;/h2&gt;
&lt;ul&gt;

&lt; ?php
  $comments = get_comments(&#039;number=10&amp;amp;amp;status=approve&#039;);

  $true_comment_count = 0;

  foreach($comments as $comment) :
?&gt;

&lt; ?php $comment_type = get_comment_type(); ?&gt;
&lt; ?php if($comment_type == &#039;comment&#039;) { ?&gt;

&lt; ?php $true_comment_count = $true_comment_count +1; ?&gt;

&lt; ?php $comm_title = get_the_title($comment-&gt;comment_post_ID);?&gt;
&lt; ?php $comm_link = get_comment_link($comment-&gt;comment_ID);?&gt;
&lt; ?php $comm_comm_temp = get_comment($comment-&gt;comment_ID,ARRAY_A);?&gt;
&lt; ?php $comm_content = $comm_comm_temp[&#039;comment_content&#039;];?&gt;

&lt;li&gt;&lt;span class=&quot;footer_comm_author&quot;&gt;&lt; ?php echo($comment-&gt;comment_author)?&gt;&lt;/span&gt; on &lt;a href=&quot;&lt;?php echo($comm_link)?&gt;&quot; title=&quot;&lt; ?php comment_excerpt(); ?&gt;&quot;&gt; &lt; ?php echo $comm_title?&gt; &lt;/a&gt;
&lt;/li&gt; 

&lt; ?php } ?&gt;

&lt; ?php if($true_comment_count == 5) {break;} ?&gt;
&lt; ?php endforeach;?&gt;

&lt;/ul&gt;
&lt;/div&gt;
</pre>
<p>The code is surrounded by a <strong>div</strong> with the class .<em>footer_recent_comments</em> so you can style and position the output in your footer / sidebar or wherever you want to place it.</p>
<p>If you want to <strong>increase the number of comments</strong> displayed, you will need to change the variable <em>true_comment_count == 5</em> to the value you want, and at the top of the code <em>get_comments(&#8216;number=10&#038;status=approve&#8217;);</em> to a number bigger than the number of comments you want. Why? Because the get_comments fetches for example 10 comments, but some of these might be trackbacks and we don&#8217;t want to display those. So within the loop we will each comment to see if they&#8217;re a real comment. If that&#8217;s the case we will display it, if not we ignore it, when we reach the number of &#8220;<em>true</em>&#8221; comments we want in the 10 we&#8217;ve read from the database, in this example that&#8217;s 5, we will interrupt the cycle and display the comments. I hope this is clear to you.</p>
<p>Just as an example, I&#8217;ll show you the CSS code I&#8217;ve used, to style the Recent Comments code I&#8217;m using in the footer.</p>
<h4>The CSS Code</h4>
<pre class="brush: css">
#footer
{
clear: both;
width: 1022px;
height: 230px;
background: url(&quot;images/footer_bg.jpg&quot;) repeat-y;
display:block;
}

#footer-content
{
clear:both;
padding: 25px 0;
margin: 0 31px 0 31px;
color: #7b7b7b;
}

#footer-content a, #footer-content a:visited
{
color: #7b7b7b;
}

#footer-content a:hover
{
color: #0592f4;
}

#footer-content div {
margin: 0 0 0 20px;
float: left;
}

#footer-content h2
{
font-family: Arial, Verdana, Helvetica;
font-size: 1.3em;
color:#efefef;
line-height: 1.1em;
letter-spacing: 1px;
padding: 0px 10px 10px 0;
margin: 0px 0 0 0;
}

#footer-content ul
{
text-align: left;
padding: 0 0 0 0;
}

#footer-content ul li
{
list-style: none;
padding: 5px 0 5px 20px;
margin: 0;
border-bottom: 1px solid #242424;
background: url(&quot;images/bullet_go_blue.png&quot;) left center no-repeat;
line-height:14px;
}

#footer-content ul li:hover
{
background: #121212 url(&quot;images/bullet_go_purple.png&quot;) left center no-repeat;
}

#footer-content ul li a
{
font-size: 1.0em;
}

#footer-content .footer_recent_comments
{
float: left;
width: 290px;
height:100%;
}

#footer-content .footer_comm_author
{
font-weight:bold;
color:#aaaaaa;
}
</pre>
<p>Hope this little bits of code can help you in some way in your present or future blogging endeavourers. You can see it in action on my footer.<!-- PHP 5.x --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.paintbits.com/wordpress/wordpress-recent-comments-without-plugin/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
		<item>
		<title>WordPress: Social Bookmarking</title>
		<link>http://www.paintbits.com/webdesign/wordpress-social-bookmarking/</link>
		<comments>http://www.paintbits.com/webdesign/wordpress-social-bookmarking/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 18:13:45 +0000</pubDate>
		<dc:creator>greven</dc:creator>
				<category><![CDATA[Webdesign]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Icons]]></category>

		<guid isPermaLink="false">http://www.paintbits.com/?p=3150</guid>
		<description><![CDATA[WordPress is the tool of use of an increasing number of people, be it a developer, clients or just blog enthusiasts. If you fall into one of this categories you should think in optimization your WordPress experience. One way to do that is insert more functionalities into your website / blog. You should be thinking [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.paintbits.com/webdesign/wordpress-social-bookmarking/"><img src="http://www.paintbits.com/wp-content/uploads/2009/07/SocialBookmarking.jpg" alt="Wordpress Social Bookmarking" title="Wordpress Social Bookmarking" width="500" height="125" class="aligncenter size-full wp-image-3160" /></a></p>
<p><a href="http://wordpress.org/">WordPress</a> is the tool of use of an increasing number of people, be it a developer, clients or just blog enthusiasts. If you fall into one of this categories you should think in optimization your WordPress experience. One way to do that is insert more functionalities into your website / blog. You should be thinking by now &#8211; Widgets! Well, widgets are one of the ways to achieve that, but do we really want to depend on widgets to implement all the features on our blog? You can, but you shouldn&#8217;t. It&#8217;s pretty obvious that after a certain amount of widgets you will see the loading time of your website increase accordingly.<br />
<span id="more-3150"></span><br />
This post falls exactly into this thematic that I hope to explore in future posts, WordPress functionalities without plugins. It seems harder than it is and even the typical <strong>Average Joe</strong> can do it. I haven&#8217;t yet explored much of the power to which you have access with a platform like <strong>wordpress</strong> and I can tell you that it&#8217;s simply amazing the stuff you can do with it.</p>
<div id="google_ads_banner">
<script type="text/javascript"><!--
google_ad_client = "pub-2666880057538413";
/* Banner */
google_ad_slot = "2171406980";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>

<p>Anyway, today is about Social Bookmarking, because it was exactly the part that I implemented into my theme today. For the ones that don&#8217;t know what the hell I&#8217;m talking about, by social bookmarking I mean the small links you can find in a lot of blogs to share the post with the rest of the world, i.e., <a href="http://digg.com/">Digg</a>, <a href="http://www.stumbleupon.com/">StumbleUpon</a>, <a href="http://www.reddit.com/">Reddit</a>&#8230; and <a href="http://twitter.com/">Twitter</a>, of course.</p>
<h3>Social Links</h3>
<p>What we want to achieve is what you can see in my blog, or like the picture below.</p>
<p><img src="http://www.paintbits.com/wp-content/uploads/2009/07/Social-Links.jpg" alt="Social Links" title="Social Links" width="500" height="72" class="aligncenter size-full wp-image-3167" /></p>
<p>The first thing to do is to write the html we need to make the horizontal menu. It&#8217;s a pretty simple unordered list (ul) with some list items (li) and a bit of <a href="http://en.wikipedia.org/wiki/Cascading_Style_Sheets">CSS</a>.</p>
<h4>The HTML</h4>
<p>Like I said, the html part is pretty simple. This is what I used to created the menu.</p>
<pre class="brush: html">
  &lt;div class=&quot;social_links&quot;&gt;
  &lt;ul&gt;
  &lt;li&gt;&lt;/li&gt;
  &lt;li&gt;&lt;/li&gt;
  &lt;li&gt;&lt;/li&gt;
  &lt;/ul&gt;
  &lt;/div&gt;
</pre>
<p>We&#8217;ll go into the structure of the links later. Right now focus on the list structure, as you can see it&#8217;s a pretty straightforward unordered list. The only thing to note is the wrapping of a div with a class (<strong>social_links</strong>).</p>
<h4>The Link Structure</h4>
<p>The key for having the social links&#8230; is to have them linking your post and title to the aggregation website of your choice (Digg, Delicious, etc..). For this you can check other blogs that makes use of social bookmarking and see the structure of the links (a bit of <em>WordPress</em> back-end knowledge comes in handy here), but for most of the link, you can find the appropriate <strong>href</strong> to use in a website like <a href="http://www.ifeedreaders.com/social-creator/">here</a>.</p>
<p>As an example, the link structure of the Digg Bookmarker looks like this:</p>
<pre class="brush: php">
&lt;li&gt;&lt;a class=&quot;digg&quot; href=&quot;http://digg.com/submit?phase=2&amp;amp;url=&lt;?php echo get_permalink() ?&gt;&amp;amp;title=&lt; ?php the_title(); ?&gt;&quot;&gt;Digg&lt;/a&gt;&lt;/li&gt;
</pre>
<h4>The CSS</h4>
<p>The next thing to do is to write some CSS to style the unordered list and the list items in it. This is the CSS i&#8217;ve used to style the Social Bookmarking Menu. I won&#8217;t go much further in explanations, but essentially the rollover effect in CSS is achieved by position the background image to a negative position, this means that in the same image you should have the normal state and the hover state, like this:</p>
<p><img src="http://www.paintbits.com/wp-content/uploads/2009/07/social_links.png" alt="CSS Rollover Effect" title="CSS Rollover Effect" width="205" height="50" class="aligncenter size-full wp-image-3246 noborder" /></p>
<p>The <strong>css</strong> code:</p>
<pre class="brush: css">
.social_links
{
clear:both;
height:16px;
margin-bottom:35px;
padding: 4px 0 15px 4px;
position:relative;
}

.social_links ul
{
position:relative;
float:left;
}

.social_links ul li
{
float:left;
list-style: none;
line-height: 16px;
padding-left: 8px;
}

.social_links ul li a
{
display:block;
padding-left: 24px;
padding-right: 4px;
height:16px;
color:#555555;
}

.social_links ul li a:hover
{
color:#f7bf29;
}

.social_links ul li a.digg
{
background: url(&quot;images/sl_digg.png&quot;) 0px 0px no-repeat;
}

.social_links ul li a:hover.digg
{
background: url(&quot;images/sl_digg.png&quot;) 0px -16px no-repeat;
}
</pre>
<p>Basically you just need to repeat the same for the other classes (just like I show here for the digg class). Nothing out of ordinary here, only thing to note is the use of the css background element position to achieve the rollover effect on the little social link icons.</p>
<h4>The Icons</h4>
<p>Last but not least, the icons to use in your links. I&#8217;ve used the excellent <a href="http://www.komodomedia.com/blog/2009/06/social-network-icon-pack/">Social Network Icon Pack</a> from <a href="http://www.komodomedia.com/">Komodo Media</a> but there are tons of other options out there, that you can use in your project. I&#8217;ll leave here a few as a starting point for your search.</p>
<h5>Social Network Icon Pack</h5>
<p><img src="http://www.paintbits.com/wp-content/uploads/2009/07/social_icons1.jpg" alt="Social Network Icon Pack" title="Social Network Icon Pack" width="500" height="90" class="aligncenter size-full wp-image-3236" /></p>
<p><strong>Link</strong>: <a href="http://www.komodomedia.com/blog/2009/06/social-network-icon-pack/#icons">Komodo Media</a></p>
<h5>Chrome Social Icons</h5>
<p><img src="http://www.paintbits.com/wp-content/uploads/2009/07/social_icons2.jpg" alt="Social Icons Chrome" title="Social Icons Chrome" width="500" height="90" class="aligncenter size-full wp-image-3236" /></p>
<p><strong>Link</strong>: <a href="http://www.chris-wallace.com/2009/05/28/free-social-media-icons-socialize/">Chris Wallace</a></p>
<h5>Social Bookmark Iconset</h5>
<p><img src="http://www.paintbits.com/wp-content/uploads/2009/07/social_icons3.jpg" alt="Social Bookmark Iconset" title="Social Bookmark Iconset" width="500" height="90" class="aligncenter size-full wp-image-3236" /></p>
<p><strong>Link</strong>: <a href="http://vikiworks.com/2007/07/28/social-bookmark-iconset-part-2/">Vikiworks</a></p>
<p>For more Icons check <a href="http://speckyboy.com/2009/07/20/50-social-service-and-bookmarking-icon-sets-for-bloggers/">this article</a> from Speckyboy Design Magazine or <a href="http://www.smashingmagazine.com/2008/05/21/40-professional-icon-sets-for-free-download/">this one</a> from Smashingmagazine.</p>
<h3>Conclusion</h3>
<p>That&#8217;s it! With this you should be able to have a nice looking Social Bookmarking menu without the need to use a plugin. Even better that not having to use a plugin is that you can customize it freely to suit your theme or personal taste. The limit is your imagination.</p>
<p>See you soon!<!-- PHP 5.x --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.paintbits.com/webdesign/wordpress-social-bookmarking/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Updating WordPress&#8230;</title>
		<link>http://www.paintbits.com/paintbits/updating-wordpress/</link>
		<comments>http://www.paintbits.com/paintbits/updating-wordpress/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 04:24:27 +0000</pubDate>
		<dc:creator>greven</dc:creator>
				<category><![CDATA[Paintbits]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.paintbits.com/?p=2882</guid>
		<description><![CDATA[To version 2.81, so beware a lot of stuff might be broken or just ugly! Transition went right but I think it&#8217;s time to abandon K2 Engine and do a new Theme from scratch! Yes, it&#8217;s time do do a major overhaul to the website. :) EDIT - In the meanwhile I might use an [...]]]></description>
			<content:encoded><![CDATA[<p>To version 2.81, so beware a lot of stuff might be broken or just ugly!</p>
<p>Transition went right but I think it&#8217;s time to abandon K2 Engine and do a new Theme from scratch! Yes, it&#8217;s time do do a major overhaul to the website. :)</p>
<p><strong>EDIT </strong>- In the meanwhile I might use an allready made theme an tweak it a bit till I do something on my own&#8230; once I find the time!</p>
<p><strong>EDIT 2</strong> &#8211; Ok, a bit better by now. There&#8217;s a ton of broken images, Links page not working, but I&#8217;ll work on that a bit later. :)</p>
<p><strong>EDIT 3</strong> &#8211; Manage to put my old home design theme working. Problem is the customization of the Widgets that K2 doesn&#8217;t support anymore are kinda gone. Anyway gives me more time to build a brand new theme. :-P<!-- PHP 5.x --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.paintbits.com/paintbits/updating-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress Plugin: WP Clickmap</title>
		<link>http://www.paintbits.com/software/wordpress-plugin-wp-clickmap/</link>
		<comments>http://www.paintbits.com/software/wordpress-plugin-wp-clickmap/#comments</comments>
		<pubDate>Sat, 07 Feb 2009 05:08:44 +0000</pubDate>
		<dc:creator>greven</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Plugins]]></category>

		<guid isPermaLink="false">http://www.paintbits.com/?p=2454</guid>
		<description><![CDATA[WordPress Clickmap is an interesting plugin to complement the analysis of your blog statistics. While tools like Google Analytics or even WordPress.com Stats offer you a discrimination of your website statistics it doesn&#8217;t give you visual feedback of the &#8220;hottest&#8221; spots on your website. Well, this is exactly what WP Clickmap does. It builds an [...]]]></description>
			<content:encoded><![CDATA[<p><img class="cframe" src="http://www.paintbits.com/Imagens/Dump/wp_click_prev_1.jpg" alt="Wordpress Clickmap Plugin" /></p>
<p><strong>WordPress Clickmap</strong> is an interesting plugin to complement the analysis of your blog statistics. While tools like <a href="http://www.google.com/analytics/">Google Analytics</a> or even <a href="http://wordpress.org/extend/plugins/stats/">WordPress.com Stats</a> offer you a discrimination of your website statistics it doesn&#8217;t give you visual feedback of the <em>&#8220;hottest&#8221;</em> spots on your website. Well, this is exactly what WP Clickmap does. It builds an overlay of your most visited pages and show you the location of the clicks it received from your visitors. That gives you a lot of information if you know how to analyze it, at a first look it should give you a clear idea what is more used in your design or any dysfunctional areas (like my title that doesn&#8217;t guide you to the main page).<br />
<span id="more-2454"></span></p>
<p class="titulo_a">From the author:</p>
<blockquote><p>For anyone who is wondering about the advantages of clickmaps, clickmaps let you see your site from a usability perspective. Your clickmaps show literally every click a user makes on a particular page. Every click is loaded into the database and over time a visual representation of collective clicks gives you an overview of the hotspots on the page.</p>
<p>While it is interesting to see links that are being clicked on, it is even more valuable to see where people are that are not links. Why do people keep clicking on the middle of my page?</p></blockquote>
<p class="titulo">Example</p>
<p><img class="cframe" src="http://www.paintbits.com/Imagens/Dump/wpclick_ex_1.jpg" alt="WP Clickmap Example" /></p>
<p><strong>Link</strong>: <a href="http://www.rogerstringer.com/projects/wpclickmap">WP Clickmap</a><!-- PHP 5.x --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.paintbits.com/software/wordpress-plugin-wp-clickmap/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WordPress Theme: Notepad Chaos</title>
		<link>http://www.paintbits.com/webdesign/wordpress-theme-notepad-chaos/</link>
		<comments>http://www.paintbits.com/webdesign/wordpress-theme-notepad-chaos/#comments</comments>
		<pubDate>Thu, 21 Aug 2008 19:40:17 +0000</pubDate>
		<dc:creator>greven</dc:creator>
				<category><![CDATA[Resources]]></category>
		<category><![CDATA[Webdesign]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.paintbits.com/?p=1273</guid>
		<description><![CDATA[Smashingmagazine released another free WordPress theme called Notepad Chaos, designed by Evan Eckard. Today we are glad to release Notepad Chaos — a free professional WordPress-theme. The theme has 2 columns, a quite vibrant design including “personal” design elements such as handwritten headings, stick-it-notes, clips and pins. The theme was designed by Evan Eckard especially [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.smashingmagazine.com/" target="_blank">Smashingmagazine</a> released another free WordPress theme called Notepad Chaos, designed by <a href="http://www.evaneckard.com/" target="_blank">Evan Eckard</a>.</p>
<blockquote><p>Today we are glad to release Notepad Chaos — a free professional WordPress-theme. The theme has 2 columns, a quite vibrant design including “personal” design elements such as handwritten headings, stick-it-notes, clips and pins. The theme was designed by Evan Eckard especially for Smashing Magazine and its readers.</p></blockquote>
<div class="wp-caption alignnone" style="width: 505px"><img alt="Notepad Chaos Theme by Smashing Magazine" src="http://i38.tinypic.com/21n060j.jpg" title="Notepad Chaos Theme by Smashing Magazine" width="495" height="125" /><p class="wp-caption-text">Notepad Chaos Theme by Smashing Magazine</p></div>
<p><span class="sidedot">Details</span>: Notepad Chaos theme has handwritten search box and navigation at the top of the layout. It&#8217;s a 2 columns theme with a vibrant illustrated background. It uses no plugins or extras.</p>
<p><span class="sidedot">Requirements</span>: No special requirements since the theme doesn’t use any plugins or extras.</p>
<p class="download"><a href="http://img176.imageshack.us/img176/5136/chaosmb7.jpg" rel="lightbox" title="Notepad Chaos Theme" alt="Notepad Chaos Theme">Preview</a> | <a href="http://www.smashingmagazine.com/2008/08/20/notepad-chaos-a-free-wordpress-theme/">Download</a></p>
<p><!-- PHP 5.x --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.paintbits.com/webdesign/wordpress-theme-notepad-chaos/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

