<?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>Theme Lab &#187; WordPress Tutorials</title>
	<atom:link href="http://www.themelab.com/category/wordpress-tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.themelab.com</link>
	<description></description>
	<lastBuildDate>Tue, 09 Mar 2010 13:30:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to Create a Comments Central Page Template in WordPress</title>
		<link>http://www.themelab.com/2010/02/24/how-to-create-a-comments-central-page-template-in-wordpress/</link>
		<comments>http://www.themelab.com/2010/02/24/how-to-create-a-comments-central-page-template-in-wordpress/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 15:15:57 +0000</pubDate>
		<dc:creator>Hafiz Rahman</dc:creator>
				<category><![CDATA[WordPress Tutorials]]></category>

		<guid isPermaLink="false">http://www.themelab.com/?p=1552</guid>
		<description><![CDATA[One way to increase visitor engagements is to reward their comments by showcasing them on your website. Additionally, you can also feature the top commenters as well, linking back to their website in the process. Here we&#8217;ll create a dedicated Page Template to  display those comments and commenters in one place.
In short, this tutorial [...]


Related posts:<ol><li><a href='http://www.themelab.com/2008/05/09/add-gravatar-support-to-your-wordpress-comments/' rel='bookmark' title='Permanent Link: Add Gravatar Support to Your WordPress Comments'>Add Gravatar Support to Your WordPress Comments</a></li><li><a href='http://www.themelab.com/2008/04/28/you-dont-need-a-blog-on-your-front-page/' rel='bookmark' title='Permanent Link: You Don&#8217;t Need a Blog On Your Front Page'>You Don&#8217;t Need a Blog On Your Front Page</a></li><li><a href='http://www.themelab.com/2010/03/02/highlight-author-comments-in-wordpress/' rel='bookmark' title='Permanent Link: Highlight Author Comments in WordPress, The Easier Right Way'>Highlight Author Comments in WordPress, The Easier Right Way</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>One way to increase visitor engagements is to reward their comments by showcasing them on your website. Additionally, you can also feature the top commenters as well, linking back to their website in the process. Here we&#8217;ll create a dedicated Page Template to  display those comments and commenters in one place.</p>
<p>In short, this tutorial will teach you how to:</p>
<ol>
<li>create a Page Template,</li>
<li>use SQL queries in your code to fetch comments with varying parameters,</li>
<li>create a section of the Page that&#8217;s only viewable by Admin,</li>
<li>add support for a comment-related plugin.</li>
</ol>
<p><span id="more-1552"></span></p>
<h3>Creating a Page Template</h3>
<p>The easiest way to create a Page Template is to open the page.php file in your theme, which will roughly look like this:</p>
<pre>
&lt;?php get_header(); ?&gt;
  &lt;div id="content"&gt;
    &lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt;
    &lt;div class="post" id="post-&lt;?php the_ID(); ?&gt;"&gt;

    &lt;h2 class="page_title"&gt;&lt;?php the_title(); ?&gt;&lt;/h2&gt;
      &lt;?php the_content(); ?&gt;
    &lt;/div&gt;
    &lt;?php comments_template(); ?&gt;
    &lt;?php endwhile; endif; ?&gt;
  &lt;/div&gt;

&lt;?php get_sidebar(); ?&gt;
&lt;?php get_footer(); ?&gt;
</pre>
<p>Copy and paste page.php&#8217;s content and add this to the very top:</p>
<pre>
&lt;?php
/*
Template Name: Comments Central
 */
?&gt;
</pre>
<p>And save it. There&#8217;s no real rules on naming a Page Template file, but it&#8217;s a good idea to go with a prefix to make it recognizable, say &#8220;pt-comment-central.php&#8221;. We haven&#8217;t added anything into this Page Template, but it&#8217;s up and running and selectable on the write new Page dashboard area.</p>
<h3>Fetching Comments</h3>
<p>For this Page Template, we&#8217;ll feature four different aspects of comments:</p>
<ul>
<li>Recent Comments,</li>
<li>Recent Trackbacks / Pingbacks,</li>
<li>Top Commenters,</li>
<li>Most Commented Posts,</li>
</ul>
<p>First, we&#8217;ll do <strong>Recent Comments</strong>:</p>
<pre>
&lt;h3&gt;Recent Comments&lt;/h3&gt;
&lt;ul id="cc-recent-comments"&gt;
&lt;?php
  $max = 7; // number item to get
  global $wpdb;
  $sql = "SELECT c.*, p.post_title FROM $wpdb-&gt;comments c INNER JOIN $wpdb-&gt;posts p ON (c.comment_post_id=p.ID) WHERE comment_approved = '1' AND comment_type not in ('trackback','pingback') ORDER BY comment_date DESC LIMIT $max";
  $results = $wpdb-&gt;get_results($sql);

  $template = '%g &lt;a href="%au"&gt;%an&lt;/a&gt; on &lt;a href="%pu#comment-%cid"&gt;%pt&lt;/a&gt;';

  $echoed = 0;
  foreach ($results as $row) {
    $tags = array('%ct','%cd','%g','%pt','%pu','%au','%an','%cid');
    $replacements = array($row-&gt;comment_title,$row-&gt;comment_date,get_avatar($row-&gt;comment_author_email,'32'),$row-&gt;post_title,get_permalink($row-&gt;comment_post_ID),$row-&gt;comment_author_url,$row-&gt;comment_author,$row-&gt;comment_ID);
    echo '&lt;li&gt;' . str_replace($tags,$replacements,$template) . '&lt;/li&gt;';
    $echoed = 1;
  }
  if ($echoed==0)
      echo '&lt;li&gt;No comment found.&lt;/li&gt;';
?&gt;
&lt;/ul&gt;
</pre>
<p>The SQL query asks for all approved comments sorted by date (latest first). $max is where we set the amount of comments to get, 7 in our case. The output of the code above will be an unordered list of recent comments:</p>
<p><img src="http://www.themelab.com/wp-content/uploads/a7ud5.png" alt="List of Recent Comments" /></p>
<p>With a little CSS we can straighten that to look better:</p>
<pre>
#cc-recent-comments li {
  width: 100%;
  float: left;
  list-style-type: none;
}

#cc-recent-comments li img {
  float: left;
  margin-top: -5px;
}
</pre>
<p><img src="http://www.themelab.com/wp-content/uploads/lEXPU.png" alt="List of Recent Comments with proper CSS" /></p>
<p>$template determines how the actual text will be written; this is based on the format made by <a href="http://wordpress.org/extend/plugins/wp-comment-remix/">WP Comment Remix</a>, and you can follow that link to learn more on customizing it (look for &#8216;tokens&#8217;).</p>
<p>Next is <strong>Recent Pingbacks / Trackbacks</strong>:</p>
<pre>
&lt;h3&gt;Recent Pingbacks / Trackbacks &lt;/h3&gt;
&lt;ul id="cc-recent-trackbacks"&gt;
&lt;?php
  $sql = "SELECT c.*, p.post_title FROM $wpdb-&gt;comments c INNER JOIN $wpdb-&gt;posts p ON (c.comment_post_id=p.ID) WHERE comment_approved = '1' AND comment_type not in ('trackback','pingback') ORDER BY comment_date DESC LIMIT $max";
  $results = $wpdb-&gt;get_results($sql);

  $template = '%g &lt;a href="%au"&gt;%an&lt;/a&gt; on &lt;a href="%pu#comment-%cid"&gt;%pt&lt;/a&gt;';

  $echoed = 0;
  foreach ($results as $row) {
    $tags = array('%ct','%cd','%g','%pt','%pu','%au','%an','%cid');
    $replacements = array($row-&gt;comment_title,$row-&gt;comment_date,get_avatar($row-&gt;comment_author_email,'32'),$row-&gt;post_title,get_permalink($row-&gt;comment_post_ID),$row-&gt;comment_author_url,$row-&gt;comment_author,$row-&gt;comment_ID);
    echo '&lt;li&gt;' . str_replace($tags,$replacements,$template) . '&lt;/li&gt;';
    $echoed=1;
  }
  if ($echoed==0)
    echo '&lt;li&gt;No comment found.&lt;/li&gt;';
?&gt;
&lt;/ul&gt;
</pre>
<p>The code above is very similar to the one we have for Recent Comments, the only differences being that we&#8217;re now asking for comments with &#8216;comment_type&#8217; under &#8216;pingback&#8217; / &#8216;trackback&#8217;, and the template is a bit different as well. Result:</p>
<p><img src="http://www.themelab.com/wp-content/uploads/pDLJE.png" alt="List of Recent Pingbacks and Trackbacks" /></p>
<p>Here&#8217;s the code for <strong>Top Commenters</strong>:</p>
<pre>
&lt;h3&gt;Top Commenters&lt;/h3&gt;
&lt;ul id="cc-top-commenters"&gt;
&lt;?php
$sql = "SELECT comment_author, comment_author_url, comment_author_email, count(comment_ID) as comment_count FROM $wpdb-&gt;comments WHERE comment_approved = '1' AND comment_type not in ('trackback','pingback') GROUP BY comment_author, comment_author_url, comment_author_email ORDER BY comment_count DESC LIMIT $max";
$results = $wpdb-&gt;get_results($sql);

$template = '&lt;a href="%au"&gt;%g %an&lt;/a&gt; (%c comments)';

$echoed = 0;
foreach ($results as $row) {
    $tags = array('%g','%au','%an','%c');
    $replacements = array(get_avatar($row-&gt;comment_author_email,'32'),$row-&gt;comment_author_url,$row-&gt;comment_author,$row-&gt;comment_count);
    echo '&lt;li&gt;' . str_replace($tags,$replacements,$template) . '&lt;/li&gt;';
    $echoed = 1;
}
if ($echoed==0)
    echo '&lt;li&gt;No commenter found.&lt;/li&gt;';
?&gt;
&lt;/ul&gt;
</pre>
<p>Nothing too mind-blowing there. Do notice the cool <a href="http://codex.wordpress.org/Function_Reference/get_avatar"><code>get_avatar()</code></a> function, though, which will give you the Gravatar for anyone whose email address you specify. In this case, we fetch the avatar image using the commenter&#8217;s e-mail address. With the CSS similar to the one we have for recent comments, we can have this result:</p>
<pre>
#cc-top-commenters li {
  width: 100%;
  float: left;
  list-style-type: none;
}

#cc-top-commenters li img {
  float: left;
  margin-top: -5px;
}
</pre>
<p><img src="http://www.themelab.com/wp-content/uploads/YiAJV.png" alt="List of Top Commenters" /></p>
<p>Last is <strong>Most Commented Posts</strong>:</p>
<pre>
&lt;h3&gt;Most Commented Posts&lt;/h3&gt;
&lt;ul id="cc-most-comments"&gt;
$sql = "SELECT p.*, c.comment_count FROM $wpdb-&gt;posts p INNER JOIN (SELECT comment_post_id, count(comment_ID) as comment_count from $wpdb-&gt;comments WHERE comment_approved='1' GROUP BY comment_post_id) c ON (c.comment_post_id=p.ID) ORDER BY c.comment_count DESC LIMIT $max";
$results = $wpdb-&gt;get_results($sql);

$template = '&lt;a href="%pu"&gt;%pt&lt;/a&gt; (%c comments)';

$echoed = 0;
foreach ($results as $row) {
  $tags = array('%pd','%pt','%pu','%c');
  $replacements = array($row-&gt;post_date,$row-&gt;post_title,get_permalink($row-&gt;ID),$row-&gt;comment_count);
  echo '&lt;li&gt;' . str_replace($tags,$replacements,$template) . '&lt;/li&gt;';
  $echoed = 1;
}
if ($echoed==0)
    echo '&lt;li&gt;No commenter found.&lt;/li&gt;';
?&gt;
&lt;/ul&gt;
</pre>
<p><img src="http://www.themelab.com/wp-content/uploads/FWJet.png" alt="List of Most Commented Post" /></p>
<p>And that&#8217;s it. Next, we&#8217;ll add some extra coolness by adding some stuff that only the admin can see.</p>
<h3>Admin-only Information</h3>
<p>To show stuff only for the admins, we can use this code snippet from <a href="wpcandy.com/articles/tutorials/tutorial-content-for-admin-only.html">WPCandy</a>:</p>
<pre>
&lt;?php
global $user_ID;
if( $user_ID ) :
  if( current_user_can('level_10') ) :
  // admin-only stuff here.
  endif;
endif; ?&gt;
</pre>
<p>Now on the Dashboard, we get a quick glance of a site&#8217;s total, approved, pending review and spam comments. Let&#8217;s replicate this for our Page Template for easier, admin-only access:</p>
<pre>
&lt;?php
  $num_comm = wp_count_comments();
?&gt;
Total Comments: &lt;a href="&lt;?php bloginfo('wpurl'); ?&gt;/wp-admin/edit-comments.php?"&gt;&lt;?php echo $num_comm-&gt;total_comments; ?&gt;&lt;/a&gt;
Approved: &lt;a href="&lt;?php bloginfo('wpurl'); ?&gt;/wp-admin/edit-comments.php?comment_status=approved"&gt;&lt;?php echo $num_comm-&gt;approved; ?&gt;&lt;/a&gt;
Moderated: &lt;a href="&lt;?php bloginfo('wpurl'); ?&gt;/wp-admin/edit-comments.php?comment_status=moderated"&gt;&lt;?php echo $num_comm-&gt;moderated; ?&gt;&lt;/a&gt;
Spam: &lt;a href="&lt;?php bloginfo('wpurl'); ?&gt;/wp-admin/edit-comments.php?comment_status=spam"&gt;&lt;?php echo $num_comm-&gt;spam; ?&gt; &lt;/a&gt;
</pre>
<p><img src="http://www.themelab.com/wp-content/uploads/QmTkK.png" alt="Admin" /></p>
<p><code>wp_count_comments()</code> is a neat function that returns an array of various comment stat numbers. We&#8217;re adding links to the respective comment administration area too.</p>
<h3>Adding Some Sparks</h3>
<p>Last, say you find a cool comment-related plugins you want to incorporate into this Page Template. Instead of adding more codes, let&#8217;s just add support for it. For this example, I&#8217;ll go with <a href="http://wordpress.org/extend/plugins/activitysparks/">Activity Sparks</a> plugin, which can &#8220;display a &#8217;sparkline&#8217; style graph in your sidebar indicate post and/or comment activity. &#8221; Sounds great to me.</p>
<p>Usually, a plugin&#8217;s readme.txt file will teach you how to add it into your theme files. In our case, the code can be like this:</p>
<pre>
&lt;?php
  if(function_exists('activitysparks')) {
    activitysparks(array('dataset'=&gt;'legend','height_px'=&gt;100,'width_px'=&gt;600,'period'=&gt;30, 'ticks'=&gt;24));
  }
?&gt;
</pre>
<p><img src="http://www.themelab.com/wp-content/uploads/V6LDW.png" alt="ActivitySparks plugin" /></p>
<p><a href="http://codex.wordpress.org/Managing_Plugins#Hiding_Plugins_When_Deactivated"><code>function_exists()</code></a> checks whether a particular function is available; in our case, the <code>activitysparks</code> function, which will be available if the plugin has been uploaded and activated. If it&#8217;s there, we show the graph. If not, then our Page Template won&#8217;t show anything (but it will still run just fine, no errors).</p>
<h3>Result and Example</h3>
<p>An example of this Page Template is <a href="http://www.wplover.com/comments-central">available here</a>. It uses the codes you see here with a few modifications, mostly to keep the HTML structure consistent with the rest of the website. The whole code for that Page Template <a href="http://pastebin.com/u4wBFcYL">is available at Pastebin</a>.</p>
<h3>Credits and Further Readings</h3>
<ul>
<li>
The codes used to display the various recent and top comments are taken from <a href="http://wordpress.org/extend/plugins/wp-comment-remix/">WP Comment Remix</a> plugin. Take a look at its code to learn more things to do with comments, like excluding admin comments from top commenters or how to take into account recent comments only. The <code>$template</code> we use to format the output can be learned more from that page, too.
</li>
<li><a href="http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates">Creating Your Own Page Template</a> on the WordPress Codex.</li>
<li><a href="http://www.themelab.com/wpcandy.com/articles/tutorials/tutorial-content-for-admin-only.html">Displaying admin-only content tutorial</a> on WPCandy.</li>


<p>Related posts:<ol><li><a href='http://www.themelab.com/2008/05/09/add-gravatar-support-to-your-wordpress-comments/' rel='bookmark' title='Permanent Link: Add Gravatar Support to Your WordPress Comments'>Add Gravatar Support to Your WordPress Comments</a></li><li><a href='http://www.themelab.com/2008/04/28/you-dont-need-a-blog-on-your-front-page/' rel='bookmark' title='Permanent Link: You Don&#8217;t Need a Blog On Your Front Page'>You Don&#8217;t Need a Blog On Your Front Page</a></li><li><a href='http://www.themelab.com/2010/03/02/highlight-author-comments-in-wordpress/' rel='bookmark' title='Permanent Link: Highlight Author Comments in WordPress, The Easier Right Way'>Highlight Author Comments in WordPress, The Easier Right Way</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.themelab.com/2010/02/24/how-to-create-a-comments-central-page-template-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Add a Widgetized Footer to Your WordPress Theme</title>
		<link>http://www.themelab.com/2009/04/25/add-a-widgetized-footer-to-your-wordpress-theme/</link>
		<comments>http://www.themelab.com/2009/04/25/add-a-widgetized-footer-to-your-wordpress-theme/#comments</comments>
		<pubDate>Sat, 25 Apr 2009 12:33:34 +0000</pubDate>
		<dc:creator>Leland</dc:creator>
				<category><![CDATA[WordPress Tutorials]]></category>

		<guid isPermaLink="false">http://www.themelab.com/?p=714</guid>
		<description><![CDATA[The inspiration for this tutorial comes from a tweet I received with feedback for the soon-to-be-released RS12 theme.

Although the widgetized footer did not ultimately make it in the release of the RS12 theme, I decided to write this tutorial to show people how exactly to add a widgetized footer in your theme.  In this [...]


Related posts:<ol><li><a href='http://www.themelab.com/2008/04/18/see-how-easy-it-is-to-widgetize-wordpress-themes/' rel='bookmark' title='Permanent Link: See How Easy It Is To Widgetize WordPress Themes'>See How Easy It Is To Widgetize WordPress Themes</a></li><li><a href='http://www.themelab.com/2008/03/06/what-exactly-is-a-widget-ready-wordpress-theme/' rel='bookmark' title='Permanent Link: What exactly is a widget-ready WordPress theme?'>What exactly is a widget-ready WordPress theme?</a></li><li><a href='http://www.themelab.com/2008/04/09/wp-multiflex-5-free-wordpress-theme-44/' rel='bookmark' title='Permanent Link: WP Multiflex 5 &#8211; Free WordPress Theme'>WP Multiflex 5 &#8211; Free WordPress Theme</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>The inspiration for this tutorial comes from a <a href="http://twitter.com/themelab/status/1482906229" title="Tweet I received from zakmorris" rel="nofollow">tweet I received</a> with feedback for the soon-to-be-released <a href="http://www.themelab.com/2009/04/09/rs12-free-wordpress-theme/" title="RS12 - Free WordPress Theme">RS12 theme</a>.</p>
<p style="text-align: center;"><a href="http://www.themelab.com/wp-content/uploads/zakmorris-twitter-response.png" rel="lightbox" title="zakmorris twitter response"><img src="http://www.themelab.com/wp-content/uploads/zakmorris-twitter-response.thumbnail.png" alt="zakmorris twitter response" width="400" height="230" /></a></p>
<p>Although the widgetized footer did not ultimately make it in the release of the RS12 theme, I decided to write this tutorial to show people how exactly to add a widgetized footer in your theme.  In this guide, you&#8217;ll learn:</p>
<ul>
<li>The HTML and CSS code needed to produce the widgetized footer</li>
<li>How to add commonly used WordPress template tags as placeholders</li>
<li>How to widgetize the footer and place widgets inside it</li>
</ul>
<p>There&#8217;s going to be a lot of code in this post, so if you&#8217;re up for it, read on&#8230;</p>
<p><span id="more-714"></span></p>
<p>I&#8217;ll be using the <a href="http://www.themelab.com/2008/10/10/green-rays-free-wordpress-theme/" title="Green Rays - Free WordPress Theme">Green Rays</a> WordPress theme as my example in this tutorial.  At the moment, the footer just has a standard &#8220;copyright&#8221; message and credits.</p>
<h3>The HTML</h3>
<p>The first step is to add the HTML markup.  Let&#8217;s say we&#8217;re going to have three different sections in the widgetized footer with lists of Most Recent Posts, Monthly Archives, and Daily Archives.  We&#8217;ll place this HTML code above the current &#8220;copyright&#8221; line.</p>
<p><code>&lt;div class=&quot;footer-item&quot;&gt;<br />
&lt;h3&gt;Recent Posts&lt;/h3&gt;<br />
&lt;ul&gt;<br />
&lt;li&gt;&lt;a href=&#039;#&#039; title=&#039;Featured post&#039;&gt;Featured post&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&#039;#&#039; title=&#039;Blockquotes&#039;&gt;Blockquotes&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&#039;#&#039; title=&#039;How the ‘more’ tag works&#039;&gt;How the ‘more’ tag works&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&#039;#&#039; title=&#039;Order or Unorder&#039;&gt;Order or Unorder&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;<br />
&lt;/div&gt;<br />
&lt;div class=&quot;footer-item&quot;&gt;<br />
&lt;h3&gt;Monthy Archives&lt;/h3&gt;<br />
&lt;ul&gt;<br />
&lt;li&gt;&lt;a href=&#039;#&#039; title=&#039;March 2008&#039;&gt;March 2008&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&#039;#&#039; title=&#039;February 2008&#039;&gt;February 2008&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&#039;#&#039; title=&#039;January 2008&#039;&gt;January 2008&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&#039;#&#039; title=&#039;December 2007&#039;&gt;December 2007&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;<br />
&lt;/div&gt;<br />
&lt;div class=&quot;footer-item&quot;&gt;<br />
&lt;h3&gt;Daily Archives&lt;/h3&gt;<br />
&lt;ul&gt;<br />
&lt;li&gt;&lt;a href=&#039;#&#039; title=&#039;March 7, 2008&#039;&gt;March 7, 2008&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&#039;#&#039; title=&#039;February 9, 2008&#039;&gt;February 9, 2008&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&#039;#&#039; title=&#039;January 4, 2008&#039;&gt;January 4, 2008&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&#039;#&#039; title=&#039;December 22, 2007&#039;&gt;December 22, 2007&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;<br />
&lt;/div&gt;<br />
&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;</code></p>
<p>Basically this code puts each &#8220;widget&#8221; in a div.  Inside each widget is a heading and an unordered list with links.  Yes, I know the links don&#8217;t go anywhere.  We&#8217;ll later replace this with WordPress template tags.  Here&#8217;s what we have so far:</p>
<p style="text-align: center;"><a href="http://www.themelab.com/wp-content/uploads/green-rays-footer-1.png" rel="lightbox" title="Green Rays Footer 1"><img src="http://www.themelab.com/wp-content/uploads/green-rays-footer-1.thumbnail.png" alt="Green Rays Footer 1" width="400" height="129" /></a></p>
<h3>The CSS</h3>
<p>As you can see, this isn&#8217;t looking so good without any CSS styling.  Add the following code to your stylesheet.</p>
<p><code>.footer-item {<br />
 float: left;<br />
 width: 33%;<br />
 padding-bottom: 10px;<br />
}<br />
.footer-item ul {<br />
 padding-left: 15px;<br />
}</code></p>
<p>What this code does is float each footer item to the left, which basically means they can be side by side.  The width is set to 33%, which gives enough room for three footer items in a single row.  There is also a little bit of padding added below each footer item.  The second piece is just padding the lists 15 pixels to the left. </p>
<p>Now you can see the HTML and CSS are starting to come together.  Here&#8217;s what you should have so far:</p>
<p style="text-align: center;"><a href="http://www.themelab.com/wp-content/uploads/green-rays-footer-2.png" rel="lightbox" title="Green Rays Footer 2"><img src="http://www.themelab.com/wp-content/uploads/green-rays-footer-2.thumbnail.png" alt="Green Rays Footer 2" width="400" height="61" /></a></p>
<h3>WordPress Code</h3>
<p>At the moment, we have a bunch of empty HTML links, with no actual WordPress code.  Let&#8217;s replace the lists under Recent Posts, Monthly Archives, and Daily Archives with the WordPress template tag equivalents.  Replace what you currently have with the following:</p>
<p><code>&lt;div class=&quot;footer-item&quot;&gt;<br />
&lt;h3&gt;Recent Posts&lt;/h3&gt;<br />
&lt;ul&gt;<br />
&lt;?php wp_get_archives(&#039;type=postbypost&amp;limit=4&#039;); ?&gt;<br />
&lt;/ul&gt;<br />
&lt;/div&gt;<br />
&lt;div class=&quot;footer-item&quot;&gt;<br />
&lt;h3&gt;Monthy Archives&lt;/h3&gt;<br />
&lt;ul&gt;<br />
&lt;?php wp_get_archives(&#039;limit=4&#039;); ?&gt;<br />
&lt;/ul&gt;<br />
&lt;/div&gt;<br />
&lt;div class=&quot;footer-item&quot;&gt;<br />
&lt;h3&gt;Daily Archives&lt;/h3&gt;<br />
&lt;ul&gt;<br />
&lt;?php wp_get_archives(&#039;type=daily&amp;limit=4&#039;); ?&gt;<br />
&lt;/ul&gt;<br />
&lt;/div&gt;</code></p>
<p>The parameters should be pretty self-explanatory, but if you&#8217;re not sure about any of them, try looking up wp_get_archives in the <a href="http://www.themelab.com/wordpress-template-tag-lookup-tool/">WordPress Template Tag Lookup Tool</a>.  Remember, I&#8217;m just using the wp_get_archives() template tags as a placeholder.  We&#8217;ll be switching these out with other WordPress widgets later, after we widgetize the footer.</p>
<h3>Widgetize It</h3>
<p>For this section of the tutorial, I&#8217;ll be borrowing parts from my previous <a href="http://www.themelab.com/2008/04/18/see-how-easy-it-is-to-widgetize-wordpress-themes/" title="See How Easy It Is To Widgetize WordPress Themes">widgetizing themes</a> tutorial.</p>
<p>The first step is to register the &#8220;sidebars.&#8221;  To do this, simply replace the current contents of the functions.php file with the following:</p>
<p><code>&lt;?php<br />
if ( function_exists(&#039;register_sidebar&#039;) )<br />
    register_sidebar(array(<br />
        &#039;name&#039; =&gt; &#039;Sidebar&#039;,<br />
        &#039;before_widget&#039; =&gt; &#039;&lt;div class=&quot;sidebaritem&quot;&gt;&#039;,<br />
        &#039;after_widget&#039; =&gt; &#039;&lt;/div&gt;&#039;,<br />
        &#039;before_title&#039; =&gt; &#039;&lt;h3&gt;&#039;,<br />
        &#039;after_title&#039; =&gt; &#039;&lt;/h3&gt;&#039;,<br />
    ));<br />
if ( function_exists(&#039;register_sidebar&#039;) )<br />
    register_sidebar(array(<br />
        &#039;name&#039; =&gt; &#039;Footer&#039;,<br />
        &#039;before_widget&#039; =&gt; &#039;&lt;div class=&quot;footer-item&quot;&gt;&#039;,<br />
        &#039;after_widget&#039; =&gt; &#039;&lt;/div&gt;&#039;,<br />
        &#039;before_title&#039; =&gt; &#039;&lt;h3&gt;&#039;,<br />
        &#039;after_title&#039; =&gt; &#039;&lt;/h3&gt;&#039;,<br />
    ));<br />
?&gt;</code></p>
<p>Now we&#8217;ll go into sidebar.php and replace the current dynamic sidebar conditional tag with this:</p>
<p><code>&lt;?php if ( !function_exists(&#039;dynamic_sidebar&#039;) || !dynamic_sidebar() ) : ?&gt;</code></p>
<p>With this:</p>
<p><code>&lt;?php if ( !function_exists(&#039;dynamic_sidebar&#039;) || !dynamic_sidebar(&quot;Sidebar&quot;) ) : ?&gt;</code></p>
<p>Now we&#8217;ll go into our footer.php file and wrap the footer items in it&#8217;s own respective sidebar conditional tag.  Right before the first &#8220;sidebar-item&#8221; div, add the following.</p>
<p><code>&lt;?php if ( !function_exists(&#039;dynamic_sidebar&#039;) || !dynamic_sidebar(&quot;Footer&quot;) ) : ?&gt;</code></p>
<p>Right after the final closing &#8220;footer-item&#8221; div (and above the &#8220;clear&#8221; div which we added earlier) we&#8217;ll add the following:</p>
<p><code>&lt;?php endif; ?&gt;</code></p>
<p>Okay, now our sidebar <em>and</em> footer should be widgetized.  Let&#8217;s test it out by adding a few widgets in the footer.  I&#8217;ll add a Blogroll widget, Recent Comments widget, and a text widget.  Here&#8217;s what it should look like:</p>
<p style="text-align: center;"><a href="http://www.themelab.com/wp-content/uploads/green-rays-footer-3.png" rel="lightbox" title="Green Rays Footer 3"><img src="http://www.themelab.com/wp-content/uploads/green-rays-footer-3.thumbnail.png" alt="Green Rays Footer 3" width="400" height="82" /></a></p>
<h3>Conclusion</h3>
<p>Well, that&#8217;s the basics of adding a widgetized footer to your theme.  You may want to add separate styling rules for other types of widgets such as the calendar or search box.  This probably won&#8217;t work with every theme, such as the RS12 theme for example, as it had a non-expandable footer.</p>
<p>If anyone wants the updated Green Rays theme by any chance, you can download it <a href="http://www.themelab.com/downloads/green-rays-updated.zip" rel="nofollow" title="Download the updated Green Rays theme">here</a>.  This way you can see where exactly I added the code.  You can compare it with the <a href="http://www.themelab.com/download/91/" rel="nofollow" title="Download the original Green Rays theme">original theme</a> as well.</p>
<p>Hope you liked the tutorial.  Will you be adding a widgetized footer to your theme?  Is there anything in the code I used above you would do differently?  Questions, comments, suggestions, and criticisms are all welcome, so feel free to sound off in the comments.</p>


<p>Related posts:<ol><li><a href='http://www.themelab.com/2008/04/18/see-how-easy-it-is-to-widgetize-wordpress-themes/' rel='bookmark' title='Permanent Link: See How Easy It Is To Widgetize WordPress Themes'>See How Easy It Is To Widgetize WordPress Themes</a></li><li><a href='http://www.themelab.com/2008/03/06/what-exactly-is-a-widget-ready-wordpress-theme/' rel='bookmark' title='Permanent Link: What exactly is a widget-ready WordPress theme?'>What exactly is a widget-ready WordPress theme?</a></li><li><a href='http://www.themelab.com/2008/04/09/wp-multiflex-5-free-wordpress-theme-44/' rel='bookmark' title='Permanent Link: WP Multiflex 5 &#8211; Free WordPress Theme'>WP Multiflex 5 &#8211; Free WordPress Theme</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.themelab.com/2009/04/25/add-a-widgetized-footer-to-your-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>44</slash:comments>
		</item>
		<item>
		<title>How To Add PollDaddy Polls On WordPress Blogs</title>
		<link>http://www.themelab.com/2008/10/16/how-to-add-polldaddy-polls-on-wordpress-blogs/</link>
		<comments>http://www.themelab.com/2008/10/16/how-to-add-polldaddy-polls-on-wordpress-blogs/#comments</comments>
		<pubDate>Thu, 16 Oct 2008 16:17:37 +0000</pubDate>
		<dc:creator>Leland</dc:creator>
				<category><![CDATA[WordPress Plugins]]></category>
		<category><![CDATA[WordPress Tutorials]]></category>

		<guid isPermaLink="false">http://www.themelab.com/?p=644</guid>
		<description><![CDATA[It&#8217;s been a long time since I&#8217;ve written a tutorial here.  I thought with Automattic&#8217;s acquisition of PollDaddy, this would be a good opportunity to write one about adding polls to your self-hosted WordPress blogs, more specifically &#8211; PollDaddy polls.  In this tutorial I&#8217;ll go over:

Installing the PollDaddy plugin
Signing up to PollDaddy (if [...]


Related posts:<ol><li><a href='http://www.themelab.com/2008/05/03/easily-add-videos-to-your-wordpress-blogs/' rel='bookmark' title='Permanent Link: Easily Add Videos to Your WordPress Blogs'>Easily Add Videos to Your WordPress Blogs</a></li><li><a href='http://www.themelab.com/2008/06/17/wordpresscom-blogs-now-have-xml-sitemaps/' rel='bookmark' title='Permanent Link: WordPress.com Blogs Now Have XML Sitemaps'>WordPress.com Blogs Now Have XML Sitemaps</a></li><li><a href='http://www.themelab.com/2008/06/27/wordpress-weekend-resources-june-27-2008/' rel='bookmark' title='Permanent Link: WordPress Weekend Resources &#8211; June 27, 2008'>WordPress Weekend Resources &#8211; June 27, 2008</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a long time since I&#8217;ve written a tutorial here.  I thought with <a href="http://ma.tt/2008/10/polldaddy-goes-automattic/">Automattic&#8217;s acquisition of PollDaddy</a>, this would be a good opportunity to write one about adding polls to your self-hosted WordPress blogs, more specifically &#8211; PollDaddy polls.  In this tutorial I&#8217;ll go over:</p>
<ul>
<li>Installing the PollDaddy plugin</li>
<li>Signing up to PollDaddy (if you don&#8217;t already have an account)</li>
<li>Creating and managing polls from within your WordPress admin panel</li>
<li>Inserting the polls you create into your WordPress posts and pages</li>
</ul>
<p>And now onto the tutorial&#8230;</p>
<p><span id="more-644"></span></p>
<h3>The Plugin</h3>
<p>You can grab this plugin from <a href="http://wordpress.org/extend/plugins/polldaddy/" title="Get the PollDaddy plugin from WordPress.org">this page</a> over at WordPress.org.  After <a href="http://www.themelab.com/2008/03/07/how-to-install-a-wordpress-plugin/" title="How to Install a WordPress Plugin">installing the plugin</a>, you&#8217;ll notice a prompt to input your PollDaddy account details.</p>
<h3>Signing Up</h3>
<p>If you don&#8217;t have a PollDaddy account already, not to worry!  I&#8217;ll walk you through it.  You can sign up for a free account <a href="http://polldaddy.com/free/" title="Sign Up for a Free PollDaddy Account">here</a>.</p>
<p style="text-align: center;"><a href="http://www.themelab.com/wp-content/uploads/polldaddy-free.png" rel="lightbox" title="PollDaddy Free"><img src="http://www.themelab.com/wp-content/uploads/polldaddy-free.thumbnail.png" alt="PollDaddy Free" width="400" height="216" /></a></p>
<p>Fill in your name, e-mail address, and password choice, and you&#8217;re all set.</p>
<h3>Configuring the Plugin</h3>
<p>After this, you&#8217;ll need to go back to your WordPress admin panel and type in the login details you just created.  Upon revisiting the PollDaddy admin page, you&#8217;ll see a new screen to create and manage your polls.</p>
<p style="text-align: center;"><a href="http://www.themelab.com/wp-content/uploads/polldaddy-admin.png" rel="lightbox" title="PollDaddy Admin"><img src="http://www.themelab.com/wp-content/uploads/polldaddy-admin.thumbnail.png" alt="PollDaddy Admin" width="400" height="216" /></a></p>
<p>I&#8217;m not sure what that warning message means, but I&#8217;ll just ignore it and see if the polls work anyway.  Seems some others are having the <a href="http://wordpress.org/support/topic/210707" title="[Plugin: PollDaddy] Error On Activation">same problem</a> as well.</p>
<h3>Creating Polls</h3>
<p>Click the &#8220;Add New&#8221; link to set up your poll.  There&#8217;s an input box for the poll question, as well as three answers.  You can click the &#8220;Add Another&#8221; button for more answer choices.  You can also set up multiple choice polls, randomize the answer order, and allow other answers.</p>
<p style="text-align: center;"><a href="http://www.themelab.com/wp-content/uploads/polldaddy-create-poll.png" rel="lightbox" title="PollDaddy Create Poll"><img src="http://www.themelab.com/wp-content/uploads/polldaddy-create-poll.thumbnail.png" alt="PollDaddy Create Poll" width="400" height="216" /></a></p>
<p>I&#8217;ll choose the &#8220;Simple White&#8221; design and leave the default settings for results and repeat voters.</p>
<p>After clicking the &#8220;Add Poll&#8221; button, I was greeted with a page with two warning messages on it.  After re-logging in to the admin panel (somehow I was logged out) and visited the Polls page, it seems the poll I created was indeed successful.</p>
<h3>Inserting Polls</h3>
<p>The next step is to go write a post, and click the orange button thingy next to <em>Add Media</em>.  You should see a screen like this with your newly created poll.</p>
<p style="text-align: center;"><a href="http://www.themelab.com/wp-content/uploads/polldaddy-send.png" rel="lightbox" title="PollDaddy Send to Editor"><img src="http://www.themelab.com/wp-content/uploads/polldaddy-send.thumbnail.png" alt="PollDaddy Send to Editor" width="400" height="216" /></a></p>
<p>Again, the same warning message pops up.  I&#8217;ll try my best to ignore those since they seem not to make a difference with the actual workings of the plugin.  After sending the poll to the editor, WordPress will generate a shortcode to place in your post.</p>
<h3>Help Me!  It doesn&#8217;t work!</h3>
<p>After saving/publishing, you&#8217;ll notice the actual poll doesn&#8217;t display in your post, just the unparsed shortcode.  To correct this, you&#8217;ll need to install <em>another</em> plugin from PollDaddy.  You can get it <a href="http://support.polldaddy.com/?p=15" title="How do I integrate a poll in my WordPress blog?">here</a>.  I grabbed the one for version 2.5 and above.</p>
<p>I&#8217;m not sure why this plugin isn&#8217;t even mentioned at all on the first plugin&#8217;s page.  I had to check this <a href="http://wordpress.org/support/topic/210731" title="[Plugin: PollDaddy] Not displaying">support thread</a> to find out why the polls weren&#8217;t displaying properly.  Apparently the first plugin was <em>just</em> for creating/managing polls.  This one is for having them display in your WordPress post.</p>
<h3>All Done</h3>
<p>That&#8217;s it.  Here&#8217;s the poll I&#8217;ve just created in action.</p>
<p style="text-align: center;"><a href="http://www.themelab.com/wp-content/uploads/polldaddy-test.png" rel="lightbox[pics644]" title="PollDaddy Test"><img src="http://www.themelab.com/wp-content/uploads/polldaddy-test.thumbnail.png" alt="PollDaddy Test" width="400" height="390" /></a></p>
<p>Pretty cool?</p>
<h3>Conclusion</h3>
<p>First of all, I&#8217;d like to congratulate Matt Mullenweg and Automattic on this awesome acquisition.</p>
<p>It&#8217;s a mystery to me why the plugin for creating/managing polls and the plugin for displaying polls are separate.  Maybe someone can enlighten me.  I personally think that these two plugins should be combined into one.</p>
<p>I think it&#8217;s also worth mentioning the self-hosted <a href="http://lesterchan.net/portfolio/programming/php/#wp-polls">WP-Polls</a> plugin by Lester Chan, if you&#8217;d rather not be dependent on a third-party service.</p>
<p>Hope you all liked the tutorial.  Feel free to comment with your thoughts on the acquisition, the WordPress integration, and the tutorial.  I&#8217;d love to hear them.</p>


<p>Related posts:<ol><li><a href='http://www.themelab.com/2008/05/03/easily-add-videos-to-your-wordpress-blogs/' rel='bookmark' title='Permanent Link: Easily Add Videos to Your WordPress Blogs'>Easily Add Videos to Your WordPress Blogs</a></li><li><a href='http://www.themelab.com/2008/06/17/wordpresscom-blogs-now-have-xml-sitemaps/' rel='bookmark' title='Permanent Link: WordPress.com Blogs Now Have XML Sitemaps'>WordPress.com Blogs Now Have XML Sitemaps</a></li><li><a href='http://www.themelab.com/2008/06/27/wordpress-weekend-resources-june-27-2008/' rel='bookmark' title='Permanent Link: WordPress Weekend Resources &#8211; June 27, 2008'>WordPress Weekend Resources &#8211; June 27, 2008</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.themelab.com/2008/10/16/how-to-add-polldaddy-polls-on-wordpress-blogs/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Dipslaying Code In WordPress Posts</title>
		<link>http://www.themelab.com/2008/06/15/dipslaying-code-in-wordpress-posts/</link>
		<comments>http://www.themelab.com/2008/06/15/dipslaying-code-in-wordpress-posts/#comments</comments>
		<pubDate>Sun, 15 Jun 2008 16:41:49 +0000</pubDate>
		<dc:creator>Leland</dc:creator>
				<category><![CDATA[WordPress Plugins]]></category>
		<category><![CDATA[WordPress Tutorials]]></category>

		<guid isPermaLink="false">http://www.themelab.com/?p=362</guid>
		<description><![CDATA[Sites that frequently publish code examples, such as tutorial sites, need an easy way to display code on their pages.  Fortunately for WordPress users, there are several great ways to display codes in your posts.  In this tutorial, you&#8217;ll learn about:

Manually displaying code
The WP Code Shield plugin
SyntaxHighligter Plus

If you run a tutorial site, [...]


Related posts:<ol><li><a href='http://www.themelab.com/2008/05/26/the-easy-way-to-display-recent-posts-in-wordpress/' rel='bookmark' title='Permanent Link: The Easy Way To Display Recent Posts in WordPress'>The Easy Way To Display Recent Posts in WordPress</a></li><li><a href='http://www.themelab.com/2008/03/21/social-bookmarking-with-wordpress/' rel='bookmark' title='Permanent Link: Social Bookmarking with WordPress'>Social Bookmarking with WordPress</a></li><li><a href='http://www.themelab.com/2008/03/16/contact-form-plugins-for-wordpress/' rel='bookmark' title='Permanent Link: Contact form plugins for WordPress'>Contact form plugins for WordPress</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>Sites that frequently publish code examples, such as tutorial sites, need an easy way to display code on their pages.  Fortunately for WordPress users, there are several great ways to display codes in your posts.  In this tutorial, you&#8217;ll learn about:</p>
<ul>
<li>Manually displaying code</li>
<li>The WP Code Shield plugin</li>
<li>SyntaxHighligter Plus</li>
</ul>
<p>If you run a tutorial site, or any other website that may require code examples, read on&#8230;</p>
<p><span id="more-362"></span></p>
<h3>Manually Displaying Code</h3>
<p>One of the problems most people face when trying to display code in their posts, is how to get it to <strong>not</strong> execute on the page.  To do this, you&#8217;ll need to use <strong>character entities</strong> to replace the actual brackets.</p>
<ul>
<li>&amp;gt; will become &lt;</li>
<li>&amp;lt; will become &gt;</li>
</ul>
<p>Manually changing each little symbol like this can become a tedious task.  Luckily, I&#8217;ve found a tool that can <a href="http://www.stanford.edu/~bsuter/js/convert.html">convert &lt; and &gt; to &amp;gt; and &amp;lt;</a>.</p>
<h3>WP Code Shield</h3>
<p>This is a plugin which will take any code inside &lt;code&gt; tags and convert the brackets into character entities automatically.  You can get the plugin <a href="http://wordpress.org/extend/plugins/wp-codeshield/" title="Get WP_CodeShield at WordPress.org">here</a>.</p>
<h3>SyntaxHighighter Plus</h3>
<p>If you want something more <em>interactive</em> than boring old code, then <a href="http://thislab.com/2007/12/16/release-wordpress-plugin-syntaxhighlighter-plus/">SyntaxHighlighter Plus</a> is the plugin for you.  You can download the plugin <a href="http://wordpress.org/extend/plugins/syntaxhighlighter-plus/" title="Get SyntaxHighlighter Plus at WordPress.org">here</a>.  This plugin supports syntax highlighting in the following languages:</p>
<ul>
<li>Bash</li>
<li>C++</li>
<li>C#</li>
<li>CSS</li>
<li>Delphi</li>
<li>Java</li>
<li>JavaScript</li>
<li>PHP</li>
<li>Python</li>
<li>Ruby</li>
<li>SQL</li>
<li>VB</li>
<li>XML/HTML</li>
</ul>
<p>If you wanted to highlight PHP, for example, you&#8217;d type out [php]your php code here[/php] and save.</p>
<p style="text-align: center;"><a href="http://www.themelab.com/wp-content/uploads/syntaxhighlighter-code.png" rel="lightbox" title="SyntaxHighlighter Code"><img src="http://www.themelab.com/wp-content/uploads/syntaxhighlighter-code.thumbnail.png" alt="SyntaxHighlighter Code" width="400" height="145" /></a></p>
<p>Saving this would produce a code box similar to this:</p>
<p style="text-align: center;"><a href="http://www.themelab.com/wp-content/uploads/syntaxhighlighter-view.png" rel="lightbox[pics362]" title="SyntaxHighlighter Plus View"><img src="http://www.themelab.com/wp-content/uploads/syntaxhighlighter-view.thumbnail.png" alt="SyntaxHighlighter Plus View" width="400" height="224" class="attachment wp-att-364 centered" /></a></p>
<p>As you can see, this plugin produced a feature-filled code box with the ability to copy and print.  Just a note, this plugin <strong>cannot</strong> be used alongside CodeShield.</p>
<h3>Conclusion</h3>
<p>As I browsed the WordPress plugin directory, it seems these aren&#8217;t the only <a href="http://wordpress.org/extend/plugins/tags/code">WordPress code plugins</a> available.  Feel free to look around and see if another plugin better suits you.</p>
<p>If you don&#8217;t write code in your WordPress posts very often, you&#8217;d probably want to use one of the first two methods listed here.  If you frequently post code examples, something like SyntaxHighlighter Plus will probably be more beneficial to you and your blog.</p>
<p>I hope you enjoyed this guide.  Feel free to subscribe to <a href="http://www.themelab.com/feed/">the feed</a> for more Theme Lab updates.</p>


<p>Related posts:<ol><li><a href='http://www.themelab.com/2008/05/26/the-easy-way-to-display-recent-posts-in-wordpress/' rel='bookmark' title='Permanent Link: The Easy Way To Display Recent Posts in WordPress'>The Easy Way To Display Recent Posts in WordPress</a></li><li><a href='http://www.themelab.com/2008/03/21/social-bookmarking-with-wordpress/' rel='bookmark' title='Permanent Link: Social Bookmarking with WordPress'>Social Bookmarking with WordPress</a></li><li><a href='http://www.themelab.com/2008/03/16/contact-form-plugins-for-wordpress/' rel='bookmark' title='Permanent Link: Contact form plugins for WordPress'>Contact form plugins for WordPress</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.themelab.com/2008/06/15/dipslaying-code-in-wordpress-posts/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Reset Your WordPress Password via phpMyAdmin</title>
		<link>http://www.themelab.com/2008/06/12/reset-your-wordpress-password-via-phpmyadmin/</link>
		<comments>http://www.themelab.com/2008/06/12/reset-your-wordpress-password-via-phpmyadmin/#comments</comments>
		<pubDate>Thu, 12 Jun 2008 15:33:27 +0000</pubDate>
		<dc:creator>Leland</dc:creator>
				<category><![CDATA[WordPress Tutorials]]></category>

		<guid isPermaLink="false">http://www.themelab.com/?p=349</guid>
		<description><![CDATA[
It seems since the release of WordPress 2.5.1 &#8211; WordPress users have been experiencing issues with the built in password reset function.
Basically, the reset password function doesn&#8217;t work because the e-mail that&#8217;s supposed to contain the reset link never comes.
Not to worry, there is still hope if you have forgotten or lost your password.  [...]


Related posts:<ol><li><a href='http://www.themelab.com/2009/08/11/wordpress-283-security-fix-admin-password-reset/' rel='bookmark' title='Permanent Link: WordPress 2.8.3 Security Fix: Admin Password Reset'>WordPress 2.8.3 Security Fix: Admin Password Reset</a></li><li><a href='http://www.themelab.com/2008/02/26/how-to-install-the-latest-version-of-wordpress/' rel='bookmark' title='Permanent Link: How to install the latest version of WordPress'>How to install the latest version of WordPress</a></li><li><a href='http://www.themelab.com/2008/04/09/the-importance-of-backing-up-your-wordpress-site/' rel='bookmark' title='Permanent Link: The Importance of Backing Up Your WordPress Site'>The Importance of Backing Up Your WordPress Site</a></li></ol>]]></description>
			<content:encoded><![CDATA[<div style="float:left;"><img src="http://www.themelab.com/wp-content/uploads/wordpress-incorrect-password.png" alt="WordPress Incorrect Password" width="300" height="140" /></a></div>
<p>It seems since the release of WordPress 2.5.1 &#8211; WordPress users have been experiencing issues with the built in password reset function.</p>
<p>Basically, the reset password function doesn&#8217;t work because the e-mail that&#8217;s supposed to contain the reset link never comes.</p>
<p>Not to worry, there is still hope if you have forgotten or lost your password.  You can reset it via <strong>phpMyAdmin</strong>, a MySQL database administration tool.</p>
<p><span id="more-349"></span></p>
<h3>Open phpMyAdmin</h3>
<p>In your hosting control panel software, such as cPanel &#8211; there should be a link to access your phpMyAdmin.  Usually this link is bundled close together with other MySQL database management tools.  Here&#8217;s a screenshot of what it looks like in cPanel.</p>
<p style="text-align: center;"><a href="http://www.themelab.com/wp-content/uploads/phpmyadmin-cpanel.png" rel="lightbox" title="phpMyAdmin cPanel"><img src="http://www.themelab.com/wp-content/uploads/phpmyadmin-cpanel.thumbnail.png" alt="phpMyAdmin cPanel" width="400" height="82" /></a></p>
<h3>Locate the users table</h3>
<p>This is almost always called <strong>wp_users</strong>, unless you changed your database prefix.</p>
<p style="text-align: center;"><a href="http://www.themelab.com/wp-content/uploads/wordpress-user-database.png" rel="lightbox" title="WordPress User Database"><img src="http://www.themelab.com/wp-content/uploads/wordpress-user-database.thumbnail.png" alt="WordPress User Database" width="400" height="188" /></a></p>
<p>After selecting the users table, you&#8217;ll need to click the <strong>Browse</strong> tab at the top, then click the little pencil icon next to the password you wish to change.</p>
<h3>Change your password</h3>
<p>You should now be on a screen like this.</p>
<p style="text-align: center;"><a href="http://www.themelab.com/wp-content/uploads/wordpress-change-password.png" rel="lightbox" title="WordPress Change Password"><img src="http://www.themelab.com/wp-content/uploads/wordpress-change-password.thumbnail.png" alt="WordPress Change Password" width="400" height="248" /></a></p>
<p>In here, type in the new password of your choice in the appropriate input field.  Make sure you select <strong>MD5</strong> from the dropdown menu.  Click &#8220;go&#8221; and your new MD5&#8242;d password should be saved.</p>
<h3>Login to your account</h3>
<p>You should now be able to login to your account with the password you chose.  WordPress 2.5.1 will automatically upgrade your password to the new encryption when you do this.</p>
<h3>Conclusion</h3>
<p>WordPress 2.5.2 is right around the corner, and hopefully this password problem will be corrected in that release.  Make sure to always keep your passwords safe and to yourself.  I hope you found this tutorial useful if you have been locked out of your WordPress 2.5 blogs.  Thanks for reading and don&#8217;t forget to subscribe to <a href="http://www.themelab.com/feed/">the feed</a>.</p>


<p>Related posts:<ol><li><a href='http://www.themelab.com/2009/08/11/wordpress-283-security-fix-admin-password-reset/' rel='bookmark' title='Permanent Link: WordPress 2.8.3 Security Fix: Admin Password Reset'>WordPress 2.8.3 Security Fix: Admin Password Reset</a></li><li><a href='http://www.themelab.com/2008/02/26/how-to-install-the-latest-version-of-wordpress/' rel='bookmark' title='Permanent Link: How to install the latest version of WordPress'>How to install the latest version of WordPress</a></li><li><a href='http://www.themelab.com/2008/04/09/the-importance-of-backing-up-your-wordpress-site/' rel='bookmark' title='Permanent Link: The Importance of Backing Up Your WordPress Site'>The Importance of Backing Up Your WordPress Site</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.themelab.com/2008/06/12/reset-your-wordpress-password-via-phpmyadmin/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Use FeedBurner to Manage Your WordPress Feeds</title>
		<link>http://www.themelab.com/2008/06/09/use-feedburner-to-manage-your-wordpress-feeds/</link>
		<comments>http://www.themelab.com/2008/06/09/use-feedburner-to-manage-your-wordpress-feeds/#comments</comments>
		<pubDate>Mon, 09 Jun 2008 12:05:47 +0000</pubDate>
		<dc:creator>Leland</dc:creator>
				<category><![CDATA[WordPress Plugins]]></category>
		<category><![CDATA[WordPress Tutorials]]></category>

		<guid isPermaLink="false">http://www.themelab.com/?p=303</guid>
		<description><![CDATA[FeedBurner is an essential tool for many bloggers.  FeedBurner is a tool for managing, syndicating, and promoting your blog feeds.  Best of all, it&#8217;s a free service.  It&#8217;s very easy to get started and in this guide, I&#8217;ll show you how.

Burn your FeedBurner feed
Redirect your WordPress feed to FeedBurner
Recommended FeedBurner services

Start taking [...]


Related posts:<ol><li><a href='http://www.themelab.com/2010/01/15/take-advantage-of-scrapers/' rel='bookmark' title='Permanent Link: Stop Complaining About Scrapers and Start Taking Advantage of Them'>Stop Complaining About Scrapers and Start Taking Advantage of Them</a></li><li><a href='http://www.themelab.com/2008/03/26/put-your-dormant-domains-to-use-with-wordpress/' rel='bookmark' title='Permanent Link: Put your dormant domains to use with WordPress'>Put your dormant domains to use with WordPress</a></li><li><a href='http://www.themelab.com/2008/09/30/agregado-wordpress-theme-review/' rel='bookmark' title='Permanent Link: Agregado WordPress Theme Review'>Agregado WordPress Theme Review</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>FeedBurner is an essential tool for many bloggers.  FeedBurner is a tool for managing, syndicating, and promoting your blog feeds.  Best of all, it&#8217;s a free service.  It&#8217;s very easy to get started and in this guide, I&#8217;ll show you how.</p>
<ul>
<li>Burn your FeedBurner feed</li>
<li>Redirect your WordPress feed to FeedBurner</li>
<li>Recommended FeedBurner services</li>
</ul>
<p>Start taking advantage of FeedBurner and read on&#8230;</p>
<p><span id="more-303"></span></p>
<h3>Burn Your Feed</h3>
<p>To get started, type your blog URL into <a href="http://www.feedburner.com">FeedBurner&#8217;s front page</a>.  If all is well, it should automatically detect your feed and verify it.  If you don&#8217;t already have an account with FeedBurner, it&#8217;s easy to sign up.  All you need to do is input your e-mail, as well as choose a username and password.</p>
<p style="text-align: center;"><a href="http://www.themelab.com/wp-content/uploads/feedburner-signup.png" rel="lightbox" title="FeedBurner Signup"><img src="http://www.themelab.com/wp-content/uploads/feedburner-signup.thumbnail.png" alt="FeedBurner Signup" width="400" height="358" /></a></p>
<p>Now that you&#8217;ve claimed your feed, you should be on a screen which tells you you have completed step 1.</p>
<p style="text-align: center;"><a href="http://www.themelab.com/wp-content/uploads/feedburner-step-1.png" rel="lightbox" title="FeedBurner Step 1"><img src="http://www.themelab.com/wp-content/uploads/feedburner-step-1.thumbnail.png" alt="FeedBurner Step 1" width="400" height="354" /></a></p>
<p>On step 2 of the FeedBurner process, it will prompt you to set up additional free FeedBurner stat tracking.  Besides this, you&#8217;re all done &#8211; unless you want to optimize and publicize your feed more, which will be gone over later.</p>
<h3>Integrate with WordPress</h3>
<p>Luckily for self-hosted WordPress users, FeedBurner provides an easy to use plugin to redirect your native WordPress feeds to your brand new FeedBurner-managed feed.  It&#8217;s called <strong>FeedBurner FeedSmith</strong>, and you can download it <a href="http://www.google.com/support/feedburner/bin/answer.py?answer=78483&#038;topic=13252">here</a>.</p>
<p>Once you have installed and activated the plugin, a new Settings page will be created where you can input your FeedBurner feed URL, as well as a FeedBurner comments feed URL (optional).</p>
<p style="text-align: center;"><a href="http://www.themelab.com/wp-content/uploads/feedburner-feedsmith.png" rel="lightbox" title="FeedBurner FeedSmith"><img src="http://www.themelab.com/wp-content/uploads/feedburner-feedsmith.thumbnail.png" alt="FeedBurner FeedSmith" width="400" height="154" /></a></p>
<p>After saving the settings, your WordPress feed URLs will now redirect to FeedBurner.</p>
<h3>Recommended FeedBurner Services</h3>
<p>FeedBurner offers a multitude of free and paid services you can use to optimize, publicize, and monetize your feeds.</p>
<ul>
<li><strong>BrowserFriendly</strong> &#8211; This will make your FeedBurner page more presentable to all browsers, making it easier for potential readers to subscribe to your feed.</li>
<li><strong>FeedFlare</strong> &#8211; Provides links such as &#8220;Add to del.icio.us&#8221; and &#8220;Digg This&#8221; to each of your feed items, so your readers can share content across social networks with ease.</li>
<li><strong>Email Subscriptions</strong> &#8211; Integrate your feed into an e-mail subscription service provided by your choice of either FeedBurner or <a href="http://www.feedblitz.com/">FeedBlitz</a>.</li>
<li><strong>PingShot</strong> &#8211; Automatically ping several web-based feed reading services such as <a href="http://www.technorati.com">Technorati</a>, <a href="http://www.bloglines.com">Bloglines</a>, <a href="http://www.pingomatic.com">Ping-o-matic</a>, and many more.</li>
</ul>
<p>This is just a small selection of many useful free services provided by FeedBurner.</p>
<h3>Conclusion</h3>
<p>If you don&#8217;t already use FeedBurner on your WordPress blogs, you should.  It&#8217;s super easy to sign up and get started, as I&#8217;ve gone over in this guide.  Once you build up a good amount of subscribers, you can also use the <strong>FeedCount</strong> to show off your subscriber count.  Thanks for reading, and don&#8217;t forget to subscribe to <a href="http://www.themelab.com/feed/">my feed</a> (served by FeedBurner) for more Theme Lab updates.</p>


<p>Related posts:<ol><li><a href='http://www.themelab.com/2010/01/15/take-advantage-of-scrapers/' rel='bookmark' title='Permanent Link: Stop Complaining About Scrapers and Start Taking Advantage of Them'>Stop Complaining About Scrapers and Start Taking Advantage of Them</a></li><li><a href='http://www.themelab.com/2008/03/26/put-your-dormant-domains-to-use-with-wordpress/' rel='bookmark' title='Permanent Link: Put your dormant domains to use with WordPress'>Put your dormant domains to use with WordPress</a></li><li><a href='http://www.themelab.com/2008/09/30/agregado-wordpress-theme-review/' rel='bookmark' title='Permanent Link: Agregado WordPress Theme Review'>Agregado WordPress Theme Review</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.themelab.com/2008/06/09/use-feedburner-to-manage-your-wordpress-feeds/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Display Inline Ads With Custom Fields and WordPress</title>
		<link>http://www.themelab.com/2008/05/22/display-inline-ads-with-custom-fields-and-wordpress/</link>
		<comments>http://www.themelab.com/2008/05/22/display-inline-ads-with-custom-fields-and-wordpress/#comments</comments>
		<pubDate>Thu, 22 May 2008 17:24:03 +0000</pubDate>
		<dc:creator>Leland</dc:creator>
				<category><![CDATA[WordPress Tutorials]]></category>

		<guid isPermaLink="false">http://www.themelab.com/?p=310</guid>
		<description><![CDATA[ProBlogger.net, an extremely popular blogging blog, recently published an article about ad positioning, and how inline ads outperformed other ad positions for him.  After this is done, you&#8217;ll be able to add inline advertisements to specific posts using custom fields.  Not just that, but you&#8217;ll be able to specify the ad size as [...]


Related posts:<ol><li><a href='http://www.themelab.com/2009/05/15/wordpress-weekend-resources-may-15-2009/' rel='bookmark' title='Permanent Link: WordPress Weekend Resources &#8211; May 15, 2009'>WordPress Weekend Resources &#8211; May 15, 2009</a></li><li><a href='http://www.themelab.com/2008/05/26/the-easy-way-to-display-recent-posts-in-wordpress/' rel='bookmark' title='Permanent Link: The Easy Way To Display Recent Posts in WordPress'>The Easy Way To Display Recent Posts in WordPress</a></li><li><a href='http://www.themelab.com/2008/04/09/wp-multiflex-5-free-wordpress-theme-44/' rel='bookmark' title='Permanent Link: WP Multiflex 5 &#8211; Free WordPress Theme'>WP Multiflex 5 &#8211; Free WordPress Theme</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>ProBlogger.net, an extremely popular blogging blog, recently published an <a href="http://www.problogger.net/archives/2008/05/10/ad-positioning-tactics-to-increase-your-adsense-earnings-overnight/" title="Ad Positioning: Tactics to Increase Your AdSense Earnings Overnight">article about ad positioning</a>, and how inline ads outperformed other ad positions for him.  After this is done, you&#8217;ll be able to add <strong>inline advertisements to specific posts</strong> using custom fields.  Not just that, but you&#8217;ll be able to <strong>specify the ad size</strong> as well.  Now I know there may be WordPress plugins that are able to do this for you, but this tutorial will go over how to do it manually by editing your WordPress theme.</p>
<ul>
<li>A simple diagram of a layout with inline ads in the content</li>
<li>What a custom field is, what they do, and what their purpose is</li>
<li>Edit your WordPress theme to accommodate custom fields</li>
<li>Add a class to your stylesheet to properly display inline ads</li>
<li>Use a custom field key and value to specify which ad size to use</li>
</ul>
<p>Maximize your ad revenue by implementing these techniques in your WordPress theme and read on&#8230;</p>
<p><span id="more-310"></span></p>
<h3>Inline Ad Diagram</h3>
<p>Please note that I&#8217;m not an artist or designer by any means.  The following diagram was done in MS Paint.  Go ahead and laugh.</p>
<p style="text-align: center;"><a href="http://www.themelab.com/wp-content/uploads/inline-ads-diagram.jpg" rel="lightbox" title="Inline Ads Diagram"><img src="http://www.themelab.com/wp-content/uploads/inline-ads-diagram.thumbnail.jpg" alt="Inline Ads Diagram" width="400" height="218" /></a></p>
<p>If you were unsure of what exactly I meant by an &#8220;inline ad&#8221; hopefully this clears it up.</p>
<h3>Custom Fields</h3>
<p>Custom fields can be assigned to any WordPress post or page.  You can use them to add additional data to be displayed elsewhere in your theme, within the <a href="http://www.themelab.com/2008/04/04/the-ultimate-guide-to-the-wordpress-loop/" title="The Ultimate Guide to the WordPress Loop">Loop</a>.  The basics of custom fields can be read about on the <a href="http://codex.wordpress.org/Using_Custom_Fields" title="Using Custom Fields">WordPress Codex</a>.</p>
<h3>Edit Your WordPress Theme</h3>
<p>Here&#8217;s the fun part.  Now it&#8217;s time to edit your WordPress theme to accommodate the custom field values and keys you&#8217;ll be adding to specific posts.  Here&#8217;s the code I use myself on this blog, minus the actual ad code.</p>
<p><code>&lt;?php $key=&quot;ad_size&quot;; if (get_post_meta($post-&gt;ID, $key, true) == &quot;300x250&quot;) { ?&gt;<br />
&lt;div class=&quot;inlineads&quot;&gt;<br />
[Your 300x250 code here]<br />
&lt;/div&gt;<br />
&lt;?php } elseif (get_post_meta($post-&gt;ID, $key, true) == &quot;250x250&quot;) { ?&gt;<br />
&lt;div class=&quot;inlineads&quot;&gt;<br />
[Your 250x250 code here]<br />
&lt;/div&gt;<br />
&lt;?php } elseif (get_post_meta($post-&gt;ID, $key, true) == &quot;200x200&quot;) { ?&gt;<br />
&lt;div class=&quot;inlineads&quot;&gt;<br />
[Your 200x200 code here]<br />
&lt;/div&gt;<br />
&lt;?php } ?&gt;</code></p>
<p>Please insert your own 300&#215;250, 250&#215;250, and 200&#215;200 ad codes in the appropriate areas.  Feel free to alter this code and use other ad sizes.  It&#8217;s up to you.</p>
<h3>Edit Your Styelsheet</h3>
<p>You probably are wondering with the &lt;div class=&#8221;inlineads&#8221;&gt; and &lt;/div&gt; surrounding your ad code is for.  This is so we can add a class called &#8220;inline ads&#8221; to your stylesheet, so you&#8217;ll be able to easily manipulate the ad positining by editing just one line in a CSS file.</p>
<p><code>.inlineads {float:left;padding:0 5px 5px 0;}</code></p>
<p>This code will float your ad to the left and pad it 5 pixels on the bottom and right sides.</p>
<h3>Start Displaying Ads</h3>
<p>Here&#8217;s the what we&#8217;ve all been waiting for &#8211; actually displaying the ads.  Fortunately all the hard stuff has already passed.  In a post, add the custom field key &#8220;ad_size&#8221; (without quotes) with the ad size (300&#215;250, 250&#215;250, 200&#215;200) you want as the value.</p>
<p style="text-align: center;"><a href="http://www.themelab.com/wp-content/uploads/ad-size-custom-field.png" rel="lightbox" title="Ad Size Custom Field"><img src="http://www.themelab.com/wp-content/uploads/ad-size-custom-field.thumbnail.png" alt="Ad Size Custom Field" width="400" height="166" /></a></p>
<p>Once you&#8217;re done, and everything has been done properly, you should now have an inline ad in your post.</p>
<h3>Conclusion</h3>
<p>Like I mentioned at the beginning of the guide, there are plugins that may help you do this exact same thing.  However this guide wasn&#8217;t just about adding ads to your posts, but also to get a better understanding of custom fields and altering WordPress themes.  There is literally limitless possibilities when it comes to custom fields, this is just one of the ways you can use them.  For another creative way to display ads on your WordPress blog, check out this article I wrote on HackWordPress entitled <a href="http://hackwordpress.com/how-to-display-adsense-on-your-first-post-within-the-loop/">Display Adsense On Your First Post Within The Loop</a>.</p>
<p>Subscribe to <a href="http://www.themelab.com/feed/">the feed</a> for more Theme Lab tutorials and theme updates.  Feel free to comment and share if you liked this tutorial.</p>


<p>Related posts:<ol><li><a href='http://www.themelab.com/2009/05/15/wordpress-weekend-resources-may-15-2009/' rel='bookmark' title='Permanent Link: WordPress Weekend Resources &#8211; May 15, 2009'>WordPress Weekend Resources &#8211; May 15, 2009</a></li><li><a href='http://www.themelab.com/2008/05/26/the-easy-way-to-display-recent-posts-in-wordpress/' rel='bookmark' title='Permanent Link: The Easy Way To Display Recent Posts in WordPress'>The Easy Way To Display Recent Posts in WordPress</a></li><li><a href='http://www.themelab.com/2008/04/09/wp-multiflex-5-free-wordpress-theme-44/' rel='bookmark' title='Permanent Link: WP Multiflex 5 &#8211; Free WordPress Theme'>WP Multiflex 5 &#8211; Free WordPress Theme</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.themelab.com/2008/05/22/display-inline-ads-with-custom-fields-and-wordpress/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>How To Get Rid of the WordPress Visual Editor</title>
		<link>http://www.themelab.com/2008/05/17/how-to-get-rid-of-the-wordpress-visual-editor/</link>
		<comments>http://www.themelab.com/2008/05/17/how-to-get-rid-of-the-wordpress-visual-editor/#comments</comments>
		<pubDate>Sat, 17 May 2008 10:57:38 +0000</pubDate>
		<dc:creator>Leland</dc:creator>
				<category><![CDATA[WordPress Plugins]]></category>
		<category><![CDATA[WordPress Tutorials]]></category>

		<guid isPermaLink="false">http://www.themelab.com/?p=297</guid>
		<description><![CDATA[There have been lots of complaints about WordPress&#8217; visual editor.  It adds extra (usually unwanted) formatting whenever you have a line break.  It&#8217;s just a pain to deal with.  Understandably, I personally never use it.  For those who may not be knowledgeable at HTML, there are excellent alternatives available.  In [...]


Related posts:<ol><li><a href='http://www.themelab.com/2009/05/17/wordpress-28-beta-1-released/' rel='bookmark' title='Permanent Link: WordPress 2.8 Beta 1 Released'>WordPress 2.8 Beta 1 Released</a></li><li><a href='http://www.themelab.com/2008/04/04/the-ultimate-guide-to-the-wordpress-loop/' rel='bookmark' title='Permanent Link: The Ultimate Guide to the WordPress Loop'>The Ultimate Guide to the WordPress Loop</a></li><li><a href='http://www.themelab.com/2008/03/13/displaying-adsense-and-other-ads-with-wordpress/' rel='bookmark' title='Permanent Link: Displaying Adsense and other ads with WordPress'>Displaying Adsense and other ads with WordPress</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>There have been lots of complaints about WordPress&#8217; visual editor.  It adds extra (usually unwanted) formatting whenever you have a line break.  It&#8217;s just a pain to deal with.  Understandably, I personally never use it.  For those who may not be knowledgeable at HTML, there are excellent alternatives available.  In this guide I&#8217;ll go over:</p>
<ul>
<li>TinyMCE Advanced</li>
<li>Dean&#8217;s FCKEditor</li>
<li>How to disable the visual editor</li>
</ul>
<p>If you&#8217;re fed up with the default WordPress visual editor, I suggest you read on.</p>
<p><span id="more-297"></span></p>
<p>Make sure before reading on you know <a href="http://www.themelab.com/2008/03/07/how-to-install-a-wordpress-plugin/" title="How to Install a WordPress Plugin">how to install a WordPress plugin</a>.  Installing with <a href="http://www.themelab.com/2008/03/09/oneclick-installer-for-wordpress/" title="OneClick Installer for WordPress">OneClick</a> will also work with both of these plugins. </p>
<h3>TinyMCE Advanced</h3>
<p><a href="http://www.laptoptips.ca/projects/tinymce-advanced/" title="TinyMCE Advanced Plugin Homepage">TinyMCE Advanced</a> is a plugin which will add on to the current functionality of the WordPress visual editor.  You&#8217;ll be able to add and remove items from the write menu.  You can <a href="http://wordpress.org/extend/plugins/tinymce-advanced/" title="Download TinyMCE Advanced at WordPress.org">get the plugin here</a>.</p>
<p style="text-align: center;"><a href="http://www.themelab.com/wp-content/uploads/wordpress-tinymce-advanced.png" rel="lightbox" title="WordPress TinyMCE Advanced"><img src="http://www.themelab.com/wp-content/uploads/wordpress-tinymce-advanced.thumbnail.png" alt="WordPress TinyMCE Advanced" width="400" height="258" /></a></p>
<p>You&#8217;ll be able to add items such as font size and face, tables, smilies, among other things.  It can also disable the automatic adding of paragraph and line break tags.</p>
<h3>Dean&#8217;s FCKEditor</h3>
<p>Now, if you want something <em>completely</em> different than the WordPress default editor.  Try <a href="http://www.deanlee.cn/wordpress/fckeditor-for-wordpress-plugin/" title="Dean's FCK Editor For WordPress Plugin">FCKEditor for WordPress</a>.  What this does is replace WordPress&#8217; default editor with <a href="http://www.fckeditor.net/" title="FCKeditor">FCKEditor</a>, a powerful editing software &#8211; similar to MS Word, except for the web.</p>
<p style="text-align: center;"><a href="http://www.themelab.com/wp-content/uploads/fckeditor-for-wordpress.png" rel="lightbox" title="FCKeditor for WordPress"><img src="http://www.themelab.com/wp-content/uploads/fckeditor-for-wordpress.thumbnail.png" alt="FCKeditor for WordPress" width="400" height="257" /></a></p>
<p>The picture explains it all, complete transformation of the editor.  Convinced yet?  Download the plugin <a href="http://wordpress.org/extend/plugins/fckeditor-for-wordpress-plugin/" title="Download Dean's FCKEditor For Wordpress">here</a>.</p>
<h3>Disabling the Visual Editor</h3>
<p>If you&#8217;re comfortable with HTML code, and would rather just get rid of the visual editor altogether &#8211; there&#8217;s a quick way to do this.  In your WordPress admin panel, simply navigate to Users -> Your Profile.</p>
<p style="text-align: center;"><a href="http://www.themelab.com/wp-content/uploads/wordpress-disable-visual-editor.png" rel="lightbox" title="WordPress Disable Visual Editor"><img src="http://www.themelab.com/wp-content/uploads/wordpress-disable-visual-editor.thumbnail.png" alt="WordPress Disable Visual Editor" width="400" height="85" /></a></p>
<p>Uncheck the box that says: <em>Use the visual editor when writing</em>.  And that&#8217;s that, no more visual editor.  You&#8217;ll be stuck with the code editor from now on &#8211; unless you check off that box again.</p>
<h3>Conclusion</h3>
<p>Hope you found some good alternatives to the WordPress visual editor after reading this post.  Thankfully with WordPress, if there&#8217;s functionality you don&#8217;t like, there&#8217;s usually a plugin to fix it.</p>
<p>If you liked this article feel free to comment and share.  Subscribe to <a href="http://www.themelab.com/feed/">the feed</a> for the latest Theme Lab updates.</p>


<p>Related posts:<ol><li><a href='http://www.themelab.com/2009/05/17/wordpress-28-beta-1-released/' rel='bookmark' title='Permanent Link: WordPress 2.8 Beta 1 Released'>WordPress 2.8 Beta 1 Released</a></li><li><a href='http://www.themelab.com/2008/04/04/the-ultimate-guide-to-the-wordpress-loop/' rel='bookmark' title='Permanent Link: The Ultimate Guide to the WordPress Loop'>The Ultimate Guide to the WordPress Loop</a></li><li><a href='http://www.themelab.com/2008/03/13/displaying-adsense-and-other-ads-with-wordpress/' rel='bookmark' title='Permanent Link: Displaying Adsense and other ads with WordPress'>Displaying Adsense and other ads with WordPress</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.themelab.com/2008/05/17/how-to-get-rid-of-the-wordpress-visual-editor/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Is your uploader broken in WordPress 2.5?</title>
		<link>http://www.themelab.com/2008/05/13/is-your-uploader-broken-in-wordpress-25/</link>
		<comments>http://www.themelab.com/2008/05/13/is-your-uploader-broken-in-wordpress-25/#comments</comments>
		<pubDate>Tue, 13 May 2008 14:20:26 +0000</pubDate>
		<dc:creator>Leland</dc:creator>
				<category><![CDATA[WordPress Plugins]]></category>
		<category><![CDATA[WordPress Tutorials]]></category>

		<guid isPermaLink="false">http://www.themelab.com/?p=283</guid>
		<description><![CDATA[If you&#8217;re getting one of those HTTP Error messages after crunching your batch uploads in WordPress 2.5, I have some solutions for you.  These errors have plagued people on the WordPress support forums ever since 2.5 was released.  The problem may lay with your web hosting configuration, your browser settings, or maybe something [...]


Related posts:<ol><li><a href='http://www.themelab.com/2009/11/30/restrict-wordpress-admin-access-by-ip-address/' rel='bookmark' title='Permanent Link: Restrict WordPress Admin Access by IP Address'>Restrict WordPress Admin Access by IP Address</a></li><li><a href='http://www.themelab.com/2008/05/17/how-to-get-rid-of-the-wordpress-visual-editor/' rel='bookmark' title='Permanent Link: How To Get Rid of the WordPress Visual Editor'>How To Get Rid of the WordPress Visual Editor</a></li><li><a href='http://www.themelab.com/2008/03/09/oneclick-installer-for-wordpress/' rel='bookmark' title='Permanent Link: OneClick Installer for WordPress'>OneClick Installer for WordPress</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re getting one of those <span style="color:red;font-weight:bold;">HTTP Error</span> messages after crunching your batch uploads in WordPress 2.5, I have some solutions for you.  These errors have <a href="http://wordpress.org/support/topic/171870">plagued people</a> on the WordPress support forums ever since 2.5 was released.  The problem may lay with your web hosting configuration, your browser settings, or maybe something else.  Don&#8217;t give up yet.  In this quick guide I&#8217;ll go over how to:</p>
<ul>
<li>Use an alternative uploader plugin to get images uploaded</li>
<li>Use an .htaccess fix to allow batch uploads</li>
<li>Disable flash on the batch upload screen</li>
</ul>
<p><span id="more-283"></span></p>
<h3>Flexible Upload</h3>
<p>One plugin (which I use on Theme Lab) that is <strong>very</strong> helpful to me is <a href="http://blog.japonophile.com/flexible-upload/" title="Flexible Upload">Flexible Upload</a>.  This will override the default WordPress 2.5 upload screen.  Not only will uploads work, but you&#8217;ll also be able to resize images and place watermarks automatically.  If you just upload a few images (not full galleries) I highly recommend you check out this plugin.  You can get the plugin <a href="http://wordpress.org/extend/plugins/flexible-upload/" title="Get the Flexible Upload plugin">here</a>.</p>
<h3>.htaccess Hack</h3>
<p>If you&#8217;d rather get the batch uploads to work how they&#8217;re supposed to, but you keep getting the <span style="color:red;font-weight:bold;">HTTP Error</span>, the problem probably lies with your web host&#8217;s security settings.  There is a quick fix to this.  Simply create a .htaccess file in your /wp-admin/ directory with the following:</p>
<p><code>&lt;IfModule mod_security.c&gt;<br />
&lt;Files async-upload.php&gt;<br />
SecFilterEngine Off<br />
SecFilterScanPOST Off<br />
&lt;/Files&gt;<br />
&lt;/IfModule&gt;</code></p>
<p>This may fix it, it may not &#8211; but it&#8217;s worth a try.  I&#8217;ve had success with this fix and it seems to work great.</p>
<h3>No Flash Uploader</h3>
<p>This should be considered a &#8220;last ditch&#8221; effort to get your WordPress 2.5 uploader to work.  What it does is disable the flash portion of your uploader, which may help those who don&#8217;t have a compatible browser.  You can get the plugin at <a href="http://wordpress.org/extend/plugins/no-flash-uploader/" title="No Flash Uploader">WordPress.org</a>.</p>
<h3>Conclusion</h3>
<p>If you were having problems with your image uploads with WordPress 2.5, I hope you found this guide to be of some use.  The batch uploader is a great feature with WordPress and hopefully you can use it how it&#8217;s supposed to work now.  If not, the Flexible Uploader should help too.</p>
<p>If you ever need support, I suggest you search the <a href="http://wordpress.org/support/">WordPress support forums</a> first.  There may be someone having the same problem as you.</p>
<p>If you found this guide useful, feel free to comment and share it.  Subscribe to <a href="http://www.themelab.com/feed/">the feed</a> for more Theme Lab updates.</p>


<p>Related posts:<ol><li><a href='http://www.themelab.com/2009/11/30/restrict-wordpress-admin-access-by-ip-address/' rel='bookmark' title='Permanent Link: Restrict WordPress Admin Access by IP Address'>Restrict WordPress Admin Access by IP Address</a></li><li><a href='http://www.themelab.com/2008/05/17/how-to-get-rid-of-the-wordpress-visual-editor/' rel='bookmark' title='Permanent Link: How To Get Rid of the WordPress Visual Editor'>How To Get Rid of the WordPress Visual Editor</a></li><li><a href='http://www.themelab.com/2008/03/09/oneclick-installer-for-wordpress/' rel='bookmark' title='Permanent Link: OneClick Installer for WordPress'>OneClick Installer for WordPress</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.themelab.com/2008/05/13/is-your-uploader-broken-in-wordpress-25/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Add Gravatar Support to Your WordPress Comments</title>
		<link>http://www.themelab.com/2008/05/09/add-gravatar-support-to-your-wordpress-comments/</link>
		<comments>http://www.themelab.com/2008/05/09/add-gravatar-support-to-your-wordpress-comments/#comments</comments>
		<pubDate>Fri, 09 May 2008 13:02:11 +0000</pubDate>
		<dc:creator>Leland</dc:creator>
				<category><![CDATA[WordPress Tutorials]]></category>

		<guid isPermaLink="false">http://www.themelab.com/?p=280</guid>
		<description><![CDATA[After a few different people requested Gravatar support in the comments for the popular Choice WordPress theme, I decided to look into it more carefully.  I came across this great post by HackWordPress which gives you a small code snippet to add Gravatars to your comments loop.  Since then, I&#8217;ve been adding Gravatar [...]


Related posts:<ol><li><a href='http://www.themelab.com/2008/07/14/if-a-commenter-does-not-have-a-gravatar/' rel='bookmark' title='Permanent Link: If A Commenter Does Not Have A Gravatar'>If A Commenter Does Not Have A Gravatar</a></li><li><a href='http://www.themelab.com/2008/04/24/how-to-add-wordpress-tag-support-to-your-theme/' rel='bookmark' title='Permanent Link: How to Add WordPress Tag Support To Your Theme'>How to Add WordPress Tag Support To Your Theme</a></li><li><a href='http://www.themelab.com/2010/02/24/how-to-create-a-comments-central-page-template-in-wordpress/' rel='bookmark' title='Permanent Link: How to Create a Comments Central Page Template in WordPress'>How to Create a Comments Central Page Template in WordPress</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>After a few different people requested <a href="http://www.gravatar.com" title="Globally Recognized Avatars">Gravatar</a> support in the comments for the popular <a href="http://www.themelab.com/2008/04/29/choice-free-wordpress-theme/" title="Choice - Free WordPress Theme">Choice</a> WordPress theme, I decided to look into it more carefully.  I came across this <a href="http://hackwordpress.com/wordpress-25-how-to-add-gravatar-to-your-wordpress-theme/" title="WordPress 2.5+: How To Add Gravatar to Your WordPress Theme">great post by HackWordPress</a> which gives you a small code snippet to add Gravatars to your comments loop.  Since then, I&#8217;ve been adding Gravatar support to all the themes here, just because it&#8217;s so simple to do.  In this guide I&#8217;ll show you how <em>exactly</em> I integrate Gravatars into themes.</p>
<p><span id="more-280"></span></p>
<p>Before you continue, please understand this is guide is written for WordPress 2.5 and above only.  The code gone over will not work in previous versions.</p>
<h3>The Gravatar Code</h3>
<p>Just plopping in the following code in your comments loop will work, but it probably won&#8217;t look very good as-is.<br />
<code>&lt;?php if(function_exists(&#039;get_avatar&#039;)) { echo get_avatar($comment, &#039;50&#039;); } ?&gt;</code></p>
<p>Basically this code will check to see if you have the <em>get_avatar</em> (native to WordPress 2.5), then display the avatar of the commenter in a 50px square.</p>
<h3>Use a Ruler</h3>
<p>If you want to make sure your Gravatars are at a suitable size, I recommend the <a href="http://www.kevinfreitas.net/extensions/measureit/" title="MeasureIt Firefox Extension">MeasureIt</a> Firefox extension.  This will help you measure out an area in your theme to determine a good size for Gravatars.</p>
<h3>Where to put the code?</h3>
<p>In the Choice theme, I found that 40 was a good size.  So where did I put this code exactly?</p>
<p style="text-align: center;"><a href="http://www.themelab.com/wp-content/uploads/choice-gravatar-location.png" rel="lightbox" title="Choice Gravatar Location"><img src="http://www.themelab.com/wp-content/uploads/choice-gravatar-location.thumbnail.png" alt="Choice Gravatar Location" width="400" height="147" /></a></p>
<p>Anywhere within the <em>foreach</em> and <em>endforeach</em> (the comments loop) will work.</p>
<h3>Styling your Gravatars</h3>
<p>Once you have Gravatars displayed on your comments template, you&#8217;ll probably want to style them too.  You&#8217;ll notice the Gravatar code spits out the &#8220;avatar&#8221; class on each image.  Let&#8217;s add a line to the CSS stylesheet to float this to the left, and add a small right margin.</p>
<p><code>img.avatar {float:left; margin-right:5px;}</code></p>
<p>There you go, you have nice looking, perfectly sized, styled Gravatars.  Of course themes will differ, you can style them however you like.</p>
<h3>Conclusion</h3>
<p>Remember, this code will only work on WordPress 2.5 and above.  The <em>function_exists</em> conditional tag will cause your theme not to break, but nothing will show up in previous versions.  More information on other methods of using Gravatars are detailed on the <a href="http://codex.wordpress.org/Using_Gravatars" title="Using Gravatars">WordPress Codex</a>.</p>
<p>If you just read this whole article and have no clue what a Gravatar is, I suggest you read <a href="http://lorelle.wordpress.com/2007/12/31/adding-avatars-and-gravatars-to-your-wordpress-and-wordpresscom-blog/" title="Adding Avatars and Gravatars to Your WordPress and WordPress.com Blog">this one first</a> by Lorelle on WordPress.  It goes over the basics of how to get your own Gravatar by <a href="http://en.gravatar.com/site/signup">signing up</a> at Gravatar.com as well as using Gravatars on older versions of WordPress with plugins.</p>
<p>Not only can Gravatars be used for comments, but they can <a href="http://hackwordpress.com/how-to-adding-the-post-authors-gravatar-to-their-individual-posts/" title="How To: Adding the Post Authors Gravatar To Their Individual Posts">also be added to author&#8217;s individual posts</a> as well.</p>
<p>If you enjoyed the article feel free to comment and share.  I&#8217;d like to hear your thoughts.  Subscribe to <a href="http://www.themelab.com/feed/">the feed</a> for the latest Theme Lab updates.</p>


<p>Related posts:<ol><li><a href='http://www.themelab.com/2008/07/14/if-a-commenter-does-not-have-a-gravatar/' rel='bookmark' title='Permanent Link: If A Commenter Does Not Have A Gravatar'>If A Commenter Does Not Have A Gravatar</a></li><li><a href='http://www.themelab.com/2008/04/24/how-to-add-wordpress-tag-support-to-your-theme/' rel='bookmark' title='Permanent Link: How to Add WordPress Tag Support To Your Theme'>How to Add WordPress Tag Support To Your Theme</a></li><li><a href='http://www.themelab.com/2010/02/24/how-to-create-a-comments-central-page-template-in-wordpress/' rel='bookmark' title='Permanent Link: How to Create a Comments Central Page Template in WordPress'>How to Create a Comments Central Page Template in WordPress</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.themelab.com/2008/05/09/add-gravatar-support-to-your-wordpress-comments/feed/</wfw:commentRss>
		<slash:comments>64</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 1.187 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-03-10 12:51:47 -->
