<?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>WPThemes.com - WordPress Themes &#187; Design Hacking</title>
	<atom:link href="http://www.wpthemes.com/category/design-hacking/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wpthemes.com</link>
	<description>All about WordPress, WP Themes, WP Plugins, WP SEO, Tips, Hacks and Tutorials</description>
	<lastBuildDate>Sat, 07 Jan 2012 20:12:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<image>
<link>http://www.wpthemes.com</link>
<url>http://www.wpthemes.com/wp-content/plugins/maxblogpress-favicon/icons/favicon-67.ico</url>
<title>WPThemes.com - WordPress Themes</title>
</image>
		<item>
		<title>WordPress Hacks &#8211; How to Remove Date from Posts</title>
		<link>http://www.wpthemes.com/wp-hacks-how-to-remove-date-from-posts/</link>
		<comments>http://www.wpthemes.com/wp-hacks-how-to-remove-date-from-posts/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 07:53:32 +0000</pubDate>
		<dc:creator>WP Themes</dc:creator>
				<category><![CDATA[Design Hacking]]></category>
		<category><![CDATA[How to remove date WordPress]]></category>
		<category><![CDATA[Remove Date WordPress]]></category>

		<guid isPermaLink="false">http://www.wpthemes.com/?p=1156</guid>
		<description><![CDATA[If you want to remove date from appearing on your blog posts, just delete the following snippet of codes from the /wp-content/themes/index.php page. 1 2 3 &#60;div class=&#34;date&#34;&#62; &#60;p&#62;&#60;?php the_time('F j, Y'); ?&#62;&#60;/p&#62; &#60;/div&#62; If your theme has single.php, page,php, archives.php, find the codes and delete them too. As always, please make a backup of [...]
Related posts:<ol>
<li><a href='http://www.wpthemes.com/display-todays-date-on-your-blog/' rel='bookmark' title='Display Today&#8217;s Date on your Blog'>Display Today&#8217;s Date on your Blog</a></li>
<li><a href='http://www.wpthemes.com/top-10-wordpress-hacks-from-june-2009/' rel='bookmark' title='Top 10 WordPress hacks from June 2009'>Top 10 WordPress hacks from June 2009</a></li>
<li><a href='http://www.wpthemes.com/how-to-add-an-edit-link-to-all-of-your-wordpress-posts/' rel='bookmark' title='How to add an &#8220;edit&#8221; link to all of your WordPress Posts'>How to add an &#8220;edit&#8221; link to all of your WordPress Posts</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>If you want <strong>to remove date</strong> from appearing on your blog posts, just delete the following snippet of codes from the /wp-content/themes/index.php page.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="language" style="font-family:monospace;">&lt;div class=&quot;date&quot;&gt;
&lt;p&gt;&lt;?php the_time('F j, Y'); ?&gt;&lt;/p&gt;
&lt;/div&gt;</pre></td></tr></table></div>

<p>If your theme has single.php, page,php, archives.php, find the codes and delete them too.  As always, please make a backup of your files before deleting/editing anything.</p>
<p><a href="http://www.wpthemes.com/wp-content/uploads/2009/06/wordpress-date-remove.jpg"><img class="alignnone size-large wp-image-1163" title="wordpress-date-remove" src="http://www.wpthemes.com/wp-content/uploads/2009/06/wordpress-date-remove-550x72.jpg" alt="wordpress-date-remove" width="550" height="72" /></a></p>
<p>On this site, we have the date displayed.  But there are cases when you don&#8217;t want to display the date.</p>
<p>Related posts:<ol>
<li><a href='http://www.wpthemes.com/display-todays-date-on-your-blog/' rel='bookmark' title='Display Today&#8217;s Date on your Blog'>Display Today&#8217;s Date on your Blog</a></li>
<li><a href='http://www.wpthemes.com/top-10-wordpress-hacks-from-june-2009/' rel='bookmark' title='Top 10 WordPress hacks from June 2009'>Top 10 WordPress hacks from June 2009</a></li>
<li><a href='http://www.wpthemes.com/how-to-add-an-edit-link-to-all-of-your-wordpress-posts/' rel='bookmark' title='How to add an &#8220;edit&#8221; link to all of your WordPress Posts'>How to add an &#8220;edit&#8221; link to all of your WordPress Posts</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.wpthemes.com/wp-hacks-how-to-remove-date-from-posts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Display Today&#8217;s Date on your Blog</title>
		<link>http://www.wpthemes.com/display-todays-date-on-your-blog/</link>
		<comments>http://www.wpthemes.com/display-todays-date-on-your-blog/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 22:39:13 +0000</pubDate>
		<dc:creator>Keenan Payne</dc:creator>
				<category><![CDATA[Design Hacking]]></category>
		<category><![CDATA[WordPress Hacks]]></category>
		<category><![CDATA[WordPress Date]]></category>

		<guid isPermaLink="false">http://www.wpthemes.com/?p=525</guid>
		<description><![CDATA[Want to show the date on your WordPress blog just anywhere? Well, here&#8217;s a simple little hack with just a little bit of code that you can place anywhere for the date to be shown. Here&#8217;s that code, and you can place it anywhere that suits your needs: &#60;?php echo date('l jS F Y'); ?&#62; [...]
Related posts:<ol>
<li><a href='http://www.wpthemes.com/display-the-total-number-of-users-of-your-wordpress-blog/' rel='bookmark' title='Display the total number of users of your WordPress blog'>Display the total number of users of your WordPress blog</a></li>
<li><a href='http://www.wpthemes.com/wp-hacks-how-to-remove-date-from-posts/' rel='bookmark' title='WordPress Hacks &#8211; How to Remove Date from Posts'>WordPress Hacks &#8211; How to Remove Date from Posts</a></li>
<li><a href='http://www.wpthemes.com/display-the-total-number-of-your-twitter-followers-on-your-wordpress-blog/' rel='bookmark' title='Display the total number of your Twitter followers on your WordPress blog'>Display the total number of your Twitter followers on your WordPress blog</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-medium wp-image-526" src="http://www.wpthemes.com/wp-content/uploads/2009/05/measure_clock_askul_taf-300x300.jpg" alt="measure_clock_askul_taf" width="199" height="199" />Want to show the date on your WordPress blog just anywhere? Well, here&#8217;s a simple little hack with just a little bit of code that you can place anywhere for the date to be shown.</p>
<p>Here&#8217;s <em>that</em> code, and you can place it anywhere that suits your needs:</p>
<pre style="padding-left: 90px;">&lt;?php echo date('l jS F Y'); ?&gt;</pre>
<p>You can futher format the date, but that seems like a little too much for me to get into. You can check out further documentation on that at the official <a href="http://php.net/manual/en/function.date.php">php</a> website.</p>
<p>Related posts:<ol>
<li><a href='http://www.wpthemes.com/display-the-total-number-of-users-of-your-wordpress-blog/' rel='bookmark' title='Display the total number of users of your WordPress blog'>Display the total number of users of your WordPress blog</a></li>
<li><a href='http://www.wpthemes.com/wp-hacks-how-to-remove-date-from-posts/' rel='bookmark' title='WordPress Hacks &#8211; How to Remove Date from Posts'>WordPress Hacks &#8211; How to Remove Date from Posts</a></li>
<li><a href='http://www.wpthemes.com/display-the-total-number-of-your-twitter-followers-on-your-wordpress-blog/' rel='bookmark' title='Display the total number of your Twitter followers on your WordPress blog'>Display the total number of your Twitter followers on your WordPress blog</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.wpthemes.com/display-todays-date-on-your-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Display the Author Who Edited a Post Last</title>
		<link>http://www.wpthemes.com/display-the-author-who-edited-a-post-last/</link>
		<comments>http://www.wpthemes.com/display-the-author-who-edited-a-post-last/#comments</comments>
		<pubDate>Sat, 30 May 2009 22:37:09 +0000</pubDate>
		<dc:creator>Keenan Payne</dc:creator>
				<category><![CDATA[Design Hacking]]></category>
		<category><![CDATA[WordPress Hacks]]></category>
		<category><![CDATA[WordPress Authors]]></category>

		<guid isPermaLink="false">http://www.wpthemes.com/?p=528</guid>
		<description><![CDATA[Want to display the author who last edited any given post? Well, here&#8217;s some simple code you can use to have that show on all of your posts. To first create the function for the task that we are going to do, copy and paste the following code into your theme&#8217;s functions.php file: if (!function_exists('get_the_modified_author')) [...]
Related posts:<ol>
<li><a href='http://www.wpthemes.com/how-to-get-the-word-count-in-a-post/' rel='bookmark' title='How to Get the Word Count in a Post'>How to Get the Word Count in a Post</a></li>
<li><a href='http://www.wpthemes.com/how-to-preset-text-in-the-wordpress-post-editor/' rel='bookmark' title='How to preset text in the WordPress post editor'>How to preset text in the WordPress post editor</a></li>
<li><a href='http://www.wpthemes.com/display-todays-date-on-your-blog/' rel='bookmark' title='Display Today&#8217;s Date on your Blog'>Display Today&#8217;s Date on your Blog</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-529" src="http://www.wpthemes.com/wp-content/uploads/2009/05/default-avatar-thumb-thumb6599242.jpg" alt="default-avatar-thumb-thumb6599242" width="186" height="186" />Want to display the author who last edited any given post? Well, here&#8217;s some simple code you can use to have that show on all of your posts.</p>
<p>To first create the function for the task that we are going to do, copy and paste the following code into your theme&#8217;s <em>functions.php</em> file:</p>
<pre style="padding-left: 30px;">if (!function_exists('get_the_modified_author')) {
  function get_the_modified_author() {
    global $post;
    if ( $last_id = get_post_meta($post-&gt;ID, '_edit_last', true) ) {
      $last_user = get_userdata($last_id);
      return apply_filters('the_modified_author', $last_user-&gt;display_name);
    }
  }
}

if (!function_exists('the_modified_author')) {
  function the_modified_author() {
    echo get_the_modified_author();
  }
}</pre>
<p>If you know what all of that mumbo-jumbo (php) means, then you should know that it&#8217;s as simple as pasting:</p>
<pre style="padding-left: 30px;">&lt;?php the_modified_author(); ?&gt;</pre>
<p>anywhere you want for the modified author of any given post. Just make sure that you put that code within you&#8217;re WordPress theme&#8217;s loop somewhere.</p>
<p>Related posts:<ol>
<li><a href='http://www.wpthemes.com/how-to-get-the-word-count-in-a-post/' rel='bookmark' title='How to Get the Word Count in a Post'>How to Get the Word Count in a Post</a></li>
<li><a href='http://www.wpthemes.com/how-to-preset-text-in-the-wordpress-post-editor/' rel='bookmark' title='How to preset text in the WordPress post editor'>How to preset text in the WordPress post editor</a></li>
<li><a href='http://www.wpthemes.com/display-todays-date-on-your-blog/' rel='bookmark' title='Display Today&#8217;s Date on your Blog'>Display Today&#8217;s Date on your Blog</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.wpthemes.com/display-the-author-who-edited-a-post-last/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Get the Word Count in a Post</title>
		<link>http://www.wpthemes.com/how-to-get-the-word-count-in-a-post/</link>
		<comments>http://www.wpthemes.com/how-to-get-the-word-count-in-a-post/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 14:59:10 +0000</pubDate>
		<dc:creator>Keenan Payne</dc:creator>
				<category><![CDATA[Design Hacking]]></category>
		<category><![CDATA[WordPress Hacks]]></category>
		<category><![CDATA[WordPress News]]></category>
		<category><![CDATA[Word Count]]></category>

		<guid isPermaLink="false">http://www.wpthemes.com/?p=201</guid>
		<description><![CDATA[Thanks to WPRecipes, I have found an amazingly helpful tutorial how to get the word count in a post to show up on your index, or on your single page if you prefer. Here&#8217;s how we go about doing this. Okay, first, open up your functions.php file in your themes directory, and paste the following [...]
Related posts:<ol>
<li><a href='http://www.wpthemes.com/display-your-tags-in-a-dropdown-menu/' rel='bookmark' title='Display your tags in a dropdown menu'>Display your tags in a dropdown menu</a></li>
<li><a href='http://www.wpthemes.com/display-the-author-who-edited-a-post-last/' rel='bookmark' title='Display the Author Who Edited a Post Last'>Display the Author Who Edited a Post Last</a></li>
<li><a href='http://www.wpthemes.com/how-to-preset-text-in-the-wordpress-post-editor/' rel='bookmark' title='How to preset text in the WordPress post editor'>How to preset text in the WordPress post editor</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Thanks to <a href="http://www.wprecipes.com/laura-asked-how-to-get-words-count-of-your-post">WPRecipes</a>, I have found an amazingly helpful tutorial how to get the word count in a post to show up on your index, or on your single page if you prefer. Here&#8217;s how we go about doing this.</p>
<p>Okay, first, open up your <em>functions.php </em>file in your themes directory, and paste the following code anywhere within:</p>
<p style="padding-left: 30px;"><code>function count_words($str){<br />
   $words = 0;<br />
$str = eregi_replace(" +", " ", $str);<br />
$array = explode(" ", $str);<br />
for($i=0;$i &lt; count($array);$i++)<br />
{<br />
if (eregi("[0-9A-Za-zÀ-ÖØ-öø-ÿ]", $array[$i]))<br />
$words++;<br />
}     return $words;<br />
}</code></p>
<p>Then, open up whereever you want the word count for your post to show up, be it the index.php or single.php, and paste this code anywhere within it:</p>
<p style="padding-left: 30px;">
<code>Word count: <!--p echo count_words($pos-->post_content); ?&gt;<br />
</code><br />
And voila! The word count for your posts will be displayed!</p>
<p>Related posts:<ol>
<li><a href='http://www.wpthemes.com/display-your-tags-in-a-dropdown-menu/' rel='bookmark' title='Display your tags in a dropdown menu'>Display your tags in a dropdown menu</a></li>
<li><a href='http://www.wpthemes.com/display-the-author-who-edited-a-post-last/' rel='bookmark' title='Display the Author Who Edited a Post Last'>Display the Author Who Edited a Post Last</a></li>
<li><a href='http://www.wpthemes.com/how-to-preset-text-in-the-wordpress-post-editor/' rel='bookmark' title='How to preset text in the WordPress post editor'>How to preset text in the WordPress post editor</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.wpthemes.com/how-to-get-the-word-count-in-a-post/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to Number Your Comments</title>
		<link>http://www.wpthemes.com/how-to-number-your-comments/</link>
		<comments>http://www.wpthemes.com/how-to-number-your-comments/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 23:40:07 +0000</pubDate>
		<dc:creator>Keenan Payne</dc:creator>
				<category><![CDATA[Design Hacking]]></category>
		<category><![CDATA[WordPress News]]></category>
		<category><![CDATA[Comments]]></category>

		<guid isPermaLink="false">http://www.wpthemes.com/?p=183</guid>
		<description><![CDATA[Lets say you have a fairly popular blog, but you want to follow the discussions that go on in the comments section. Instead of depending on that small avatar to find where you posted, here is an easy way to number all of the comments made on a post. I have included this on my [...]
Related posts:<ol>
<li><a href='http://www.wpthemes.com/display-the-total-number-of-users-of-your-wordpress-blog/' rel='bookmark' title='Display the total number of users of your WordPress blog'>Display the total number of users of your WordPress blog</a></li>
<li><a href='http://www.wpthemes.com/how-to-add-an-edit-link-to-all-of-your-wordpress-posts/' rel='bookmark' title='How to add an &#8220;edit&#8221; link to all of your WordPress Posts'>How to add an &#8220;edit&#8221; link to all of your WordPress Posts</a></li>
<li><a href='http://www.wpthemes.com/display-the-total-number-of-your-twitter-followers-on-your-wordpress-blog/' rel='bookmark' title='Display the total number of your Twitter followers on your WordPress blog'>Display the total number of your Twitter followers on your WordPress blog</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Lets say you have a fairly popular blog, but you want to follow the discussions that go on in the comments section. Instead of depending on that small avatar to find where you posted, here is an easy way to number all of the comments made on a post. I have included this on my blogs, and it has been very well accepted by readers and users. Here&#8217;s how we will achieve this simple hack:</p>
<p>Open up your comments.php file, and find this line:</p>
<blockquote>
<pre>&lt;?php foreach ($comments as $comment) : ?&gt;</pre>
</blockquote>
<p>Then, put this code <em>above</em> what you just found:</p>
<pre style="padding-left: 30px;">&lt;?php $i = 0; ?&gt;
&lt;?php $i++; ?&gt;</pre>
<p>It&#8217;s as simple as that. As far as I know this works with the new threaded commenting system in WordPress 2.7+, but if you have any problems, please leave a comment and I&#8217;ll see if I can fix it.</p>
<h6>Thanks to <a href="http://problogtuts.com/tutorials/how-to-number-your-comments/">Pro Blog Tutorials</a> for this simple hack</h6>
<p>Related posts:<ol>
<li><a href='http://www.wpthemes.com/display-the-total-number-of-users-of-your-wordpress-blog/' rel='bookmark' title='Display the total number of users of your WordPress blog'>Display the total number of users of your WordPress blog</a></li>
<li><a href='http://www.wpthemes.com/how-to-add-an-edit-link-to-all-of-your-wordpress-posts/' rel='bookmark' title='How to add an &#8220;edit&#8221; link to all of your WordPress Posts'>How to add an &#8220;edit&#8221; link to all of your WordPress Posts</a></li>
<li><a href='http://www.wpthemes.com/display-the-total-number-of-your-twitter-followers-on-your-wordpress-blog/' rel='bookmark' title='Display the total number of your Twitter followers on your WordPress blog'>Display the total number of your Twitter followers on your WordPress blog</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.wpthemes.com/how-to-number-your-comments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Add the Author&#8217;s Gravatar in Posts</title>
		<link>http://www.wpthemes.com/how-to-add-the-authors-gravatar-in-posts/</link>
		<comments>http://www.wpthemes.com/how-to-add-the-authors-gravatar-in-posts/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 01:24:24 +0000</pubDate>
		<dc:creator>Keenan Payne</dc:creator>
				<category><![CDATA[Design Hacking]]></category>
		<category><![CDATA[WordPress News]]></category>
		<category><![CDATA[Gravatar]]></category>

		<guid isPermaLink="false">http://www.wpthemes.com/?p=141</guid>
		<description><![CDATA[There are tons of sites out there that will use avatars along with usernames when displaying posts. On a WordPress blog, the easiest way to do that is by using gravatars. This is a site that is run by Automattic, and you can upload an avatar, that is then attached to your email address. This [...]
Related posts:<ol>
<li><a href='http://www.wpthemes.com/how-to-add-an-edit-link-to-all-of-your-wordpress-posts/' rel='bookmark' title='How to add an &#8220;edit&#8221; link to all of your WordPress Posts'>How to add an &#8220;edit&#8221; link to all of your WordPress Posts</a></li>
<li><a href='http://www.wpthemes.com/wp-hacks-how-to-remove-date-from-posts/' rel='bookmark' title='WordPress Hacks &#8211; How to Remove Date from Posts'>WordPress Hacks &#8211; How to Remove Date from Posts</a></li>
<li><a href='http://www.wpthemes.com/show-latest-posts-in-the-sidebar/' rel='bookmark' title='Show latest posts in the sidebar'>Show latest posts in the sidebar</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>There are tons of sites out there that will use avatars along with usernames when displaying posts. On a WordPress blog, the easiest way to do that is by using <a href="http://en.gravatar.com/">gravatars</a>. This is a site that is run by Automattic, and you can upload an avatar, that is then attached to your email address. This little hack will show your avatar to people on your site, but only if you are using the same email for your gravatar account and WordPress acount.</p>
<p>Just place this code in your index.php, and single.php, where you want the avatar to be displayed:</p>
<pre style="padding-left: 30px;">&lt;?php
	$author_email = get_the_author_email();
	echo get_avatar($author_email, '96');
?&gt;</pre>
<p>And it&#8217;s as easy as that!</p>
<p>Related posts:<ol>
<li><a href='http://www.wpthemes.com/how-to-add-an-edit-link-to-all-of-your-wordpress-posts/' rel='bookmark' title='How to add an &#8220;edit&#8221; link to all of your WordPress Posts'>How to add an &#8220;edit&#8221; link to all of your WordPress Posts</a></li>
<li><a href='http://www.wpthemes.com/wp-hacks-how-to-remove-date-from-posts/' rel='bookmark' title='WordPress Hacks &#8211; How to Remove Date from Posts'>WordPress Hacks &#8211; How to Remove Date from Posts</a></li>
<li><a href='http://www.wpthemes.com/show-latest-posts-in-the-sidebar/' rel='bookmark' title='Show latest posts in the sidebar'>Show latest posts in the sidebar</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.wpthemes.com/how-to-add-the-authors-gravatar-in-posts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Make Header Images Random</title>
		<link>http://www.wpthemes.com/how-to-make-header-images-random/</link>
		<comments>http://www.wpthemes.com/how-to-make-header-images-random/#comments</comments>
		<pubDate>Sat, 21 Mar 2009 16:34:55 +0000</pubDate>
		<dc:creator>Keenan Payne</dc:creator>
				<category><![CDATA[Design Hacking]]></category>
		<category><![CDATA[WordPress News]]></category>
		<category><![CDATA[Header]]></category>

		<guid isPermaLink="false">http://www.wpthemes.com/?p=131</guid>
		<description><![CDATA[So you want to make the header images on your blog random huh? Well, you can do this extremely easy. Here are the steps to achieve this simple task. 1) Get the Images Okay, get 4 images that you want to use on your blog. Here&#8217;s what I&#8217;ll be using: header1.jpg header2.jpg header3.jpg header4.jpg Put [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<div id="attachment_132" class="wp-caption aligncenter" style="width: 460px"><img class="size-full wp-image-132" src="http://www.wpthemes.com/wp-content/uploads/2009/03/random-header-images.jpg" alt="Courtesy of: http://www.bigsquaredot.com" width="450" height="225" /><p class="wp-caption-text">Courtesy of: http://www.bigsquaredot.com</p></div>
<p>So you want to make the header images on your blog random huh? Well, you can do this extremely easy. Here are the steps to achieve this simple task.</p>
<h2>1) Get the Images</h2>
<p>Okay, get 4 images that you want to use on your blog. Here&#8217;s what I&#8217;ll be using:</p>
<p>header1.jpg</p>
<p>header2.jpg</p>
<p>header3.jpg</p>
<p>header4.jpg</p>
<p>Put all of these images in a folder called <em>images</em> in your theme folder. If you don&#8217;t have that folder yet, go ahead and create one now.</p>
<h2>2) Randomizing the Images</h2>
<p>Put this code in your header.php file just below the tag:</p>
<p style="padding-left: 30px;"><code>&lt;?php<br />
$header_image = rand(1,4);<br />
?&gt;</code></p>
<p>So if you more or less images, you can change 4 to whatever it is.</p>
<h2>3) Randomizing in the Header</h2>
<p>If you&#8217;re using a more professional WordPress theme, then more than likely the header image is going to be called in from the .css file using a header DIV. Well, you&#8217;re going to have to get rid of that, and use this old-school HTML technique.</p>
<p>Use this code to pull the header images into your theme:</p>
<p style="padding-left: 30px;"><code>&lt;img src="&lt;? bloginfo('template_directory'); ?&gt;/images/blogtop-&lt;? echo $header_image; ?&gt;.gif" alt="header" /&gt;</code></p>
<p>So that concludes our random header image tutorial for WordPress. You can pretty much use the same technique, but modify it a little bit, if you want to use this on a static HTML/CSS website, a forum, or maybe even another CMS!</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.wpthemes.com/how-to-make-header-images-random/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to add an &#8220;edit&#8221; link to all of your WordPress Posts</title>
		<link>http://www.wpthemes.com/how-to-add-an-edit-link-to-all-of-your-wordpress-posts/</link>
		<comments>http://www.wpthemes.com/how-to-add-an-edit-link-to-all-of-your-wordpress-posts/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 00:38:35 +0000</pubDate>
		<dc:creator>Keenan Payne</dc:creator>
				<category><![CDATA[Design Hacking]]></category>
		<category><![CDATA[WordPress News]]></category>

		<guid isPermaLink="false">http://www.wpthemes.com/?p=114</guid>
		<description><![CDATA[Sometimes you look at a post that you or a fellow author has published, and you see a little typo. Well, while you could go from there, to the admin dashboard, and then to the edit page, and then find the page, well, that&#8217;s just not much fun now is it? Well, here is a [...]
Related posts:<ol>
<li><a href='http://www.wpthemes.com/how-to-add-the-authors-gravatar-in-posts/' rel='bookmark' title='How to Add the Author&#8217;s Gravatar in Posts'>How to Add the Author&#8217;s Gravatar in Posts</a></li>
<li><a href='http://www.wpthemes.com/wp-hacks-how-to-remove-date-from-posts/' rel='bookmark' title='WordPress Hacks &#8211; How to Remove Date from Posts'>WordPress Hacks &#8211; How to Remove Date from Posts</a></li>
<li><a href='http://www.wpthemes.com/automatically-get-trim-urls-for-your-blog-posts/' rel='bookmark' title='Automatically get tr.im urls for your blog posts'>Automatically get tr.im urls for your blog posts</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Sometimes you look at a post that you or a fellow author has published, and you see a little typo. Well, while you could go from there, to the admin dashboard, and then to the edit page, and then find the page, well, that&#8217;s just not much fun now is it? Well, here is a simple little design hack that you can use to have an edit link be posted on every post made on your blog so you can do those quick-edits anytime you need to.</p>
<pre style="padding-left: 30px;">&lt;?php
if (current_user_can('level_10')){ ?&gt;
    &lt;a href="&lt;?php bloginfo('wpurl');?&gt;/wp-admin/edit.php?p=&lt;?php the_ID(); ?&gt;"&gt;Edit Post&lt;/a&gt;
&lt;?php } ?&gt;</pre>
<p><img class="aligncenter size-full wp-image-118" src="http://www.wpthemes.com/wp-content/uploads/2009/03/editlink1.jpg" alt="editlink1" width="514" height="53" /></p>
<p>The <em>current_user_can()</em> function checks the level of the current user if you are logged in, and if you have sufficent permissions, then you can edit the post. I&#8217;m going to assume that you don&#8217;t want anybody that&#8217;s below an administrator to edit a post, so we are going to use <em>current_user_can(’level_10′)</em> to make sure that only administrators can edit said post.</p>
<p>You can change that to whatever you want, and what permissions the user must have to edit a post.</p>
<p>Related posts:<ol>
<li><a href='http://www.wpthemes.com/how-to-add-the-authors-gravatar-in-posts/' rel='bookmark' title='How to Add the Author&#8217;s Gravatar in Posts'>How to Add the Author&#8217;s Gravatar in Posts</a></li>
<li><a href='http://www.wpthemes.com/wp-hacks-how-to-remove-date-from-posts/' rel='bookmark' title='WordPress Hacks &#8211; How to Remove Date from Posts'>WordPress Hacks &#8211; How to Remove Date from Posts</a></li>
<li><a href='http://www.wpthemes.com/automatically-get-trim-urls-for-your-blog-posts/' rel='bookmark' title='Automatically get tr.im urls for your blog posts'>Automatically get tr.im urls for your blog posts</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.wpthemes.com/how-to-add-an-edit-link-to-all-of-your-wordpress-posts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to widgetize a WordPress blog theme</title>
		<link>http://www.wpthemes.com/how-to-widgetize-a-wordpress-blog-theme/</link>
		<comments>http://www.wpthemes.com/how-to-widgetize-a-wordpress-blog-theme/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 02:12:18 +0000</pubDate>
		<dc:creator>Keenan Payne</dc:creator>
				<category><![CDATA[Design Hacking]]></category>
		<category><![CDATA[WordPress Themes]]></category>
		<category><![CDATA[Widgets]]></category>

		<guid isPermaLink="false">http://www.wpthemes.com/?p=88</guid>
		<description><![CDATA[Okay, if you&#8217;re new to WordPress, more than likely all of the themes you are looking at using are widgetized. For that special occasion that your WordPress blog theme isn&#8217;t widgetized, here&#8217;s a simple way of how to hack your theme, and with just a little bit of code, you can widgetize your theme. Here&#8217;s [...]
Related posts:<ol>
<li><a href='http://www.wpthemes.com/automatically-get-trim-urls-for-your-blog-posts/' rel='bookmark' title='Automatically get tr.im urls for your blog posts'>Automatically get tr.im urls for your blog posts</a></li>
<li><a href='http://www.wpthemes.com/how-to-preset-text-in-the-wordpress-post-editor/' rel='bookmark' title='How to preset text in the WordPress post editor'>How to preset text in the WordPress post editor</a></li>
<li><a href='http://www.wpthemes.com/how-to-get-the-word-count-in-a-post/' rel='bookmark' title='How to Get the Word Count in a Post'>How to Get the Word Count in a Post</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-large wp-image-92" src="http://www.wpthemes.com/wp-content/uploads/2009/03/wp-sidebar-480x344.png" alt="wp-sidebar" width="480" height="344" /></p>
<p>Okay, if you&#8217;re new to WordPress, more than likely all of the themes you are looking at using are widgetized. For that special occasion that your WordPress blog theme <em>isn&#8217;t </em>widgetized, here&#8217;s a simple way of how to hack your theme, and with just a little bit of code, you can widgetize your theme.</p>
<p>Here&#8217;s what the official page from Automattic says:</p>
<blockquote><p>Instead of register_sidebar() you should use register_sidebars(n) where n is the number of sidebars. Then place the appropriate number in the dynamic_sidebar() function, starting with 1. (There are several other ways to use these function. See the <a href="http://automattic.com/code/widgets/api/">API</a>). You can even give your sidebars names rather than numbers, which lets you maintain a different set of saved sidebars for each theme.</p></blockquote>
<p>You edit this in the functions.php file. If you don&#8217;t have a functions.php file, then you probably don&#8217;t have a widgetized theme. Here&#8217;s an example of some code that you could put in your functions.php file:</p>
<p style="padding-left: 30px;">&lt;?php<br />
if ( function_exists(’register_sidebar’) )<br />
register_sidebar();<br />
?&gt;</p>
<p>Then, right beneath the &lt;ul&gt; tag in the sidebar.php file, add this little piece of code:</p>
<p style="padding-left: 30px;">&lt;?php if ( !function_exists(’dynamic_sidebar’)<br />
|| !dynamic_sidebar() ) : ?&gt;</p>
<p>Then, right above the closing &lt;/ul&gt; tag, put this code:</p>
<p style="padding-left: 30px;">&lt;?php endif; ?&gt;</p>
<p>Pretty simple huh? Now that old-school WordPress theme that you are using is completely widgetized and customizable!</p>
<p>Related posts:<ol>
<li><a href='http://www.wpthemes.com/automatically-get-trim-urls-for-your-blog-posts/' rel='bookmark' title='Automatically get tr.im urls for your blog posts'>Automatically get tr.im urls for your blog posts</a></li>
<li><a href='http://www.wpthemes.com/how-to-preset-text-in-the-wordpress-post-editor/' rel='bookmark' title='How to preset text in the WordPress post editor'>How to preset text in the WordPress post editor</a></li>
<li><a href='http://www.wpthemes.com/how-to-get-the-word-count-in-a-post/' rel='bookmark' title='How to Get the Word Count in a Post'>How to Get the Word Count in a Post</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.wpthemes.com/how-to-widgetize-a-wordpress-blog-theme/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

