<?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>WPDailyBits</title>
	<atom:link href="http://wpdailybits.com/feed" rel="self" type="application/rss+xml" />
	<link>http://wpdailybits.com</link>
	<description>Mastering WordPress, bits by bits</description>
	<lastBuildDate>Mon, 13 Aug 2012 10:43:00 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>How to Merge Categories in WordPress</title>
		<link>http://maketecheasier.com/merge-categories-in-wordpress/2012/03/30?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=merge-categories-in-wordpress</link>
		<comments>http://maketecheasier.com/merge-categories-in-wordpress/2012/03/30#comments</comments>
		<pubDate>Sun, 19 Feb 2012 04:47:50 +0000</pubDate>
		<dc:creator>Damien</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[categories]]></category>
		<category><![CDATA[merging]]></category>

		<guid isPermaLink="false">http://wpdailybits.com/?p=556</guid>
		<description><![CDATA[There are times when you have two similar categories that you want to merge together. When I say merging, it means: 1. Move all the posts from one category to the other (the one you want to merge into). 2. &#8230; <a href="http://maketecheasier.com/merge-categories-in-wordpress/2012/03/30">Continue reading <span class="meta-nav">&#8594;</span></a><p><div style="float:left;margin-bottom:10px"><a href="http://api.tweetmeme.com/share?url=http://maketecheasier.com/merge-categories-in-wordpress/2012/03/30&amp;service=bit.ly" target="_blank"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://maketecheasier.com/merge-categories-in-wordpress/2012/03/30" style="border:none;margin-right:5px" width="51" height="61"></a><a href="http://digg.com/tools/diggthis/login?url=http://maketecheasier.com/merge-categories-in-wordpress/2012/03/30" target="_blank"><img src="http://images.maketecheasier.com/diggme.png" style="border:none;margin-right:5px" ></a><a href="http://www.facebook.com/sharer.php?u=http://maketecheasier.com/merge-categories-in-wordpress/2012/03/30" target="_blank"><img src="http://images.maketecheasier.com/fb.jpg" style="border:none;margin-right:5px" ></a><a href="http://www.google.com/reader/link?url=http://maketecheasier.com/merge-categories-in-wordpress/2012/03/30&amp;title=How+to+Merge+Categories+in+WordPress&amp;srcTitle=MakeTechEasier.com" target="_blank"><img src="http://images.maketecheasier.com/gbuzz-feed.png" style="border:none;margin-right:5px" ></a><a href="http://www.stumbleupon.com/submit?url=http://maketecheasier.com/merge-categories-in-wordpress/2012/03/30" target="_blank"><img src="http://images.maketecheasier.com/stumble.png"></a></div><div style="clear:both"></div> <strong><a href="http://maketecheasier.com/merge-categories-in-wordpress/2012/03/30">How to Merge Categories in WordPress</a></strong> originally published on <a href="http://wpdailybits.com">WP Daily Bits</a> (<a href="http://feeds.feedburner.com/wpdailybits">RSS</a>) <br/> Follow us at <a href="https://www.facebook.com/pages/WpDailyBits/105300046209744">Facebook</a> | <a href="http://twitter.com/WPDailyBits">Twitter</a></p>
]]></description>
				<content:encoded><![CDATA[<p>There are times when you have two similar categories that you want to merge together. When I say merging, it means:</p>
<p>1. Move all the posts from one category to the other (the one you want to merge into).<br />
2. Delete the duplicate category.<br />
3. Add a URL forwarder to redirect the previous category URL to the new URL.</p>
<p>Here is how it can be done:<br />
<span id="more-556"></span><br />
1. Go to &#8220;Posts -> All Posts&#8221;. Filter all the posts with the category you want to delete.</p>
<p><img src="http://images.wpdailybits.com/files/2012/02/category-filter.png" alt="category-filter" title="category-filter" width="387" height="83" class="aligncenter size-full wp-image-560" /></p>
<p>2. Check out the number of posts in this particular category. </p>
<p><img src="http://images.wpdailybits.com/files/2012/02/category-no-of-items.png" alt="category-no-of-items" title="category-no-of-items" width="223" height="111" class="aligncenter size-full wp-image-561" /></p>
<p>At the top of the screen, click Screen Options and enter the number of posts to appear on the screen. </p>
<p><img src="http://images.wpdailybits.com/files/2012/02/category-set-posts-on-screen.png" alt="category-set-posts-on-screen" title="category-set-posts-on-screen" width="203" height="149" class="aligncenter size-full wp-image-562" /></p>
<p>3. Check every single post in this category. Click Edit. </p>
<p>4. Add the category that you want to merge into. </p>
<p><img src="http://images.wpdailybits.com/files/2012/02/category-change-category.png" alt="category-change-category" title="category-change-category" width="557" height="238" class="aligncenter size-full wp-image-563" /></p>
<p>5. Once done, go to &#8220;Posts -> Category&#8221;. Delete the category from the list.</p>
<p>6. Lastly, using a FTP application, download the .htaccess file (assuming you are using a Linux web host) from your server root. Open the .htaccess file with a text editor and addd the following line to the top of the file.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">redirect <span style="color: #cc66cc;">301</span> relative<span style="color: #339933;">-</span>path<span style="color: #339933;">-</span>to<span style="color: #339933;">-</span>old<span style="color: #339933;">-</span>category<span style="color: #339933;">-</span>url http<span style="color: #339933;">:</span><span style="color: #666666; font-style: italic;">//your-domain.com/path-to-new-category-url</span></pre></div></div>

<p>For example, the old category URL is at http://your-domain.com/category/old-category and the new category URL is http://your-domain.com/category/new-category. So in your .htaccess file, you will put:</p>
<p><em>redirect 301 /category/old-category http://your-domain.com/category/new-category</em>.</p>
<p>Save and upload (and replace) the .htacess file to your server.</p>
<p>That&#8217;s it.<br />
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://wpdailybits.com/blog/handle-create-custom-post-type/440' title='How to Create And Handle Custom Post Type'>How to Create And Handle Custom Post Type</a></li>
</ul>
<p><div style="float:left;margin-bottom:10px"><a href="http://api.tweetmeme.com/share?url=http://maketecheasier.com/merge-categories-in-wordpress/2012/03/30&amp;service=bit.ly" target="_blank"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://maketecheasier.com/merge-categories-in-wordpress/2012/03/30" style="border:none;margin-right:5px" width="51" height="61"></a><a href="http://digg.com/tools/diggthis/login?url=http://maketecheasier.com/merge-categories-in-wordpress/2012/03/30" target="_blank"><img src="http://images.maketecheasier.com/diggme.png" style="border:none;margin-right:5px" ></a><a href="http://www.facebook.com/sharer.php?u=http://maketecheasier.com/merge-categories-in-wordpress/2012/03/30" target="_blank"><img src="http://images.maketecheasier.com/fb.jpg" style="border:none;margin-right:5px" ></a><a href="http://www.google.com/reader/link?url=http://maketecheasier.com/merge-categories-in-wordpress/2012/03/30&amp;title=How+to+Merge+Categories+in+WordPress&amp;srcTitle=MakeTechEasier.com" target="_blank"><img src="http://images.maketecheasier.com/gbuzz-feed.png" style="border:none;margin-right:5px" ></a><a href="http://www.stumbleupon.com/submit?url=http://maketecheasier.com/merge-categories-in-wordpress/2012/03/30" target="_blank"><img src="http://images.maketecheasier.com/stumble.png"></a></div><div style="clear:both"></div> <strong><a href="http://maketecheasier.com/merge-categories-in-wordpress/2012/03/30">How to Merge Categories in WordPress</a></strong> originally published on <a href="http://wpdailybits.com">WP Daily Bits</a> (<a href="http://feeds.feedburner.com/wpdailybits">RSS</a>) <br/> Follow us at <a href="https://www.facebook.com/pages/WpDailyBits/105300046209744">Facebook</a> | <a href="http://twitter.com/WPDailyBits">Twitter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://maketecheasier.com/merge-categories-in-wordpress/2012/03/30/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Create New Permalink Rules</title>
		<link>http://wpdailybits.com/blog/create-new-permalink-rules/550?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=create-new-permalink-rules</link>
		<comments>http://wpdailybits.com/blog/create-new-permalink-rules/550#comments</comments>
		<pubDate>Sat, 04 Feb 2012 11:16:01 +0000</pubDate>
		<dc:creator>Damien</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[permalink]]></category>
		<category><![CDATA[rewrite]]></category>

		<guid isPermaLink="false">http://wpdailybits.com/?p=550</guid>
		<description><![CDATA[In WordPress, you can easily create a pretty URL by going to the Settings -> Permalinks section and update the permalink structure. However, if you are creating your own themes or plugins, there are times when you need to create &#8230; <a href="http://wpdailybits.com/blog/create-new-permalink-rules/550">Continue reading <span class="meta-nav">&#8594;</span></a><p><div style="float:left;margin-bottom:10px"><a href="http://api.tweetmeme.com/share?url=http://wpdailybits.com/blog/create-new-permalink-rules/550&amp;service=bit.ly" target="_blank"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://wpdailybits.com/blog/create-new-permalink-rules/550" style="border:none;margin-right:5px" width="51" height="61"></a><a href="http://digg.com/tools/diggthis/login?url=http://wpdailybits.com/blog/create-new-permalink-rules/550" target="_blank"><img src="http://images.maketecheasier.com/diggme.png" style="border:none;margin-right:5px" ></a><a href="http://www.facebook.com/sharer.php?u=http://wpdailybits.com/blog/create-new-permalink-rules/550" target="_blank"><img src="http://images.maketecheasier.com/fb.jpg" style="border:none;margin-right:5px" ></a><a href="http://www.google.com/reader/link?url=http://wpdailybits.com/blog/create-new-permalink-rules/550&amp;title=How+to+Create+New+Permalink+Rules&amp;srcTitle=MakeTechEasier.com" target="_blank"><img src="http://images.maketecheasier.com/gbuzz-feed.png" style="border:none;margin-right:5px" ></a><a href="http://www.stumbleupon.com/submit?url=http://wpdailybits.com/blog/create-new-permalink-rules/550" target="_blank"><img src="http://images.maketecheasier.com/stumble.png"></a></div><div style="clear:both"></div> <strong><a href="http://wpdailybits.com/blog/create-new-permalink-rules/550">How to Create New Permalink Rules</a></strong> originally published on <a href="http://wpdailybits.com">WP Daily Bits</a> (<a href="http://feeds.feedburner.com/wpdailybits">RSS</a>) <br/> Follow us at <a href="https://www.facebook.com/pages/WpDailyBits/105300046209744">Facebook</a> | <a href="http://twitter.com/WPDailyBits">Twitter</a></p>
]]></description>
				<content:encoded><![CDATA[<p>In WordPress, you can easily create a pretty URL by going to the Settings -> Permalinks section and update the permalink structure. However, if you are creating your own themes or plugins, there are times when you need to create a custom permalink structure.</p>
<p>For example: you want to implement a permalink: <em>http://your-site.com/movies/1</em> which translates to <em>http://your-site.com/index.php?movies=1</em>.</p>
<p>Here&#8217;s how you do it:<br />
<span id="more-550"></span><br />
In your plugin or theme&#8217;s functions.php file, add the following lines:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'generate_rewrite_rules'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'my_add_rewrite_rules'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> my_add_rewrite_rules<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$wp_rewrite</span> <span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span>   <span style="color: #000088;">$new_rules</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> 
     <span style="color: #0000ff;">'movies/(.+)'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'index.php?movies='</span> <span style="color: #339933;">.</span>
       <span style="color: #000088;">$wp_rewrite</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">preg_index</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$wp_rewrite</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">rules</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$new_rules</span> <span style="color: #339933;">+</span> <span style="color: #000088;">$wp_rewrite</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">rules</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">add_filter<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'query_vars'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'my_insert_query_vars'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> my_insert_query_vars<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$vars</span> <span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>   <span style="color: #990000;">array_push</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$vars</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'movies'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$vars</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'parse_query'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'my_parseQuery'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> my_parseQuery<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>get_query_var<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'movies'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
		add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'template_redirect'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'my_template'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> my_template<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>	<span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span>TEMPLATEPATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/movies.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">exit</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>The first function translate the new permalink structure to the one you want.</p>
<p>The second function is to add the query variable into the default variable list.</p>
<p>The third function is to redirect the page to a custom template when the new query variable is detected. </p>
<p>That&#8217;s it.<br />
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://wpdailybits.com/blog/redirect-a-page-post-to-external-site/369' title='How to Redirect a Page/Post to External Site'>How to Redirect a Page/Post to External Site</a></li>
</ul>
<p><div style="float:left;margin-bottom:10px"><a href="http://api.tweetmeme.com/share?url=http://wpdailybits.com/blog/create-new-permalink-rules/550&amp;service=bit.ly" target="_blank"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://wpdailybits.com/blog/create-new-permalink-rules/550" style="border:none;margin-right:5px" width="51" height="61"></a><a href="http://digg.com/tools/diggthis/login?url=http://wpdailybits.com/blog/create-new-permalink-rules/550" target="_blank"><img src="http://images.maketecheasier.com/diggme.png" style="border:none;margin-right:5px" ></a><a href="http://www.facebook.com/sharer.php?u=http://wpdailybits.com/blog/create-new-permalink-rules/550" target="_blank"><img src="http://images.maketecheasier.com/fb.jpg" style="border:none;margin-right:5px" ></a><a href="http://www.google.com/reader/link?url=http://wpdailybits.com/blog/create-new-permalink-rules/550&amp;title=How+to+Create+New+Permalink+Rules&amp;srcTitle=MakeTechEasier.com" target="_blank"><img src="http://images.maketecheasier.com/gbuzz-feed.png" style="border:none;margin-right:5px" ></a><a href="http://www.stumbleupon.com/submit?url=http://wpdailybits.com/blog/create-new-permalink-rules/550" target="_blank"><img src="http://images.maketecheasier.com/stumble.png"></a></div><div style="clear:both"></div> <strong><a href="http://wpdailybits.com/blog/create-new-permalink-rules/550">How to Create New Permalink Rules</a></strong> originally published on <a href="http://wpdailybits.com">WP Daily Bits</a> (<a href="http://feeds.feedburner.com/wpdailybits">RSS</a>) <br/> Follow us at <a href="https://www.facebook.com/pages/WpDailyBits/105300046209744">Facebook</a> | <a href="http://twitter.com/WPDailyBits">Twitter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://wpdailybits.com/blog/create-new-permalink-rules/550/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>How to Change the Font in HTML Editor In WordPress 3.3</title>
		<link>http://wpdailybits.com/blog/change-the-font-in-html-editor-in-wordpress-3-3/545?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=change-the-font-in-html-editor-in-wordpress-3-3</link>
		<comments>http://wpdailybits.com/blog/change-the-font-in-html-editor-in-wordpress-3-3/545#comments</comments>
		<pubDate>Thu, 19 Jan 2012 01:43:30 +0000</pubDate>
		<dc:creator>Damien</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[fonts]]></category>
		<category><![CDATA[html editor]]></category>
		<category><![CDATA[wp3.3]]></category>

		<guid isPermaLink="false">http://wpdailybits.com/?p=545</guid>
		<description><![CDATA[The HTML editor in WordPress 3.3 uses monospace font, which is not really friendly to the eyes. Here&#8217;s how to change the font to, say, verdana. 1. Open your theme&#8217;s functions.php file. 2. Copy and paste the following code: add_action( &#8230; <a href="http://wpdailybits.com/blog/change-the-font-in-html-editor-in-wordpress-3-3/545">Continue reading <span class="meta-nav">&#8594;</span></a><p><div style="float:left;margin-bottom:10px"><a href="http://api.tweetmeme.com/share?url=http://wpdailybits.com/blog/change-the-font-in-html-editor-in-wordpress-3-3/545&amp;service=bit.ly" target="_blank"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://wpdailybits.com/blog/change-the-font-in-html-editor-in-wordpress-3-3/545" style="border:none;margin-right:5px" width="51" height="61"></a><a href="http://digg.com/tools/diggthis/login?url=http://wpdailybits.com/blog/change-the-font-in-html-editor-in-wordpress-3-3/545" target="_blank"><img src="http://images.maketecheasier.com/diggme.png" style="border:none;margin-right:5px" ></a><a href="http://www.facebook.com/sharer.php?u=http://wpdailybits.com/blog/change-the-font-in-html-editor-in-wordpress-3-3/545" target="_blank"><img src="http://images.maketecheasier.com/fb.jpg" style="border:none;margin-right:5px" ></a><a href="http://www.google.com/reader/link?url=http://wpdailybits.com/blog/change-the-font-in-html-editor-in-wordpress-3-3/545&amp;title=How+to+Change+the+Font+in+HTML+Editor+In+WordPress+3.3&amp;srcTitle=MakeTechEasier.com" target="_blank"><img src="http://images.maketecheasier.com/gbuzz-feed.png" style="border:none;margin-right:5px" ></a><a href="http://www.stumbleupon.com/submit?url=http://wpdailybits.com/blog/change-the-font-in-html-editor-in-wordpress-3-3/545" target="_blank"><img src="http://images.maketecheasier.com/stumble.png"></a></div><div style="clear:both"></div> <strong><a href="http://wpdailybits.com/blog/change-the-font-in-html-editor-in-wordpress-3-3/545">How to Change the Font in HTML Editor In WordPress 3.3</a></strong> originally published on <a href="http://wpdailybits.com">WP Daily Bits</a> (<a href="http://feeds.feedburner.com/wpdailybits">RSS</a>) <br/> Follow us at <a href="https://www.facebook.com/pages/WpDailyBits/105300046209744">Facebook</a> | <a href="http://twitter.com/WPDailyBits">Twitter</a></p>
]]></description>
				<content:encoded><![CDATA[<p>The HTML editor in WordPress 3.3 uses monospace font, which is not really friendly to the eyes. Here&#8217;s how to change the font to, say, <em>verdana</em>.</p>
<p>1. Open your theme&#8217;s <code>functions.php</code> file.</p>
<p>2. Copy and paste the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">add_action( 'admin_head-post.php', 'wpdb_fix_html_editor_font' );
add_action( 'admin_head-post-new.php', 'wpdb_fix_html_editor_font' );
&nbsp;
function wpdb_fix_html_editor_font() { ?&gt;
    &lt;style type=&quot;text/css&quot;&gt;
        #editorcontainer #content, #wp_mce_fullscreen, .wp-editor-area {
            font-family: Verdana,Arial,sans-serif!important;
        }
    &lt;/style&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span></pre></div></div>

<p>3. Save the functions.php file back to the server.</p>
<p>That&#8217;s it.<br />
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li>No Related Posts</li>
</ul>
<p><div style="float:left;margin-bottom:10px"><a href="http://api.tweetmeme.com/share?url=http://wpdailybits.com/blog/change-the-font-in-html-editor-in-wordpress-3-3/545&amp;service=bit.ly" target="_blank"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://wpdailybits.com/blog/change-the-font-in-html-editor-in-wordpress-3-3/545" style="border:none;margin-right:5px" width="51" height="61"></a><a href="http://digg.com/tools/diggthis/login?url=http://wpdailybits.com/blog/change-the-font-in-html-editor-in-wordpress-3-3/545" target="_blank"><img src="http://images.maketecheasier.com/diggme.png" style="border:none;margin-right:5px" ></a><a href="http://www.facebook.com/sharer.php?u=http://wpdailybits.com/blog/change-the-font-in-html-editor-in-wordpress-3-3/545" target="_blank"><img src="http://images.maketecheasier.com/fb.jpg" style="border:none;margin-right:5px" ></a><a href="http://www.google.com/reader/link?url=http://wpdailybits.com/blog/change-the-font-in-html-editor-in-wordpress-3-3/545&amp;title=How+to+Change+the+Font+in+HTML+Editor+In+WordPress+3.3&amp;srcTitle=MakeTechEasier.com" target="_blank"><img src="http://images.maketecheasier.com/gbuzz-feed.png" style="border:none;margin-right:5px" ></a><a href="http://www.stumbleupon.com/submit?url=http://wpdailybits.com/blog/change-the-font-in-html-editor-in-wordpress-3-3/545" target="_blank"><img src="http://images.maketecheasier.com/stumble.png"></a></div><div style="clear:both"></div> <strong><a href="http://wpdailybits.com/blog/change-the-font-in-html-editor-in-wordpress-3-3/545">How to Change the Font in HTML Editor In WordPress 3.3</a></strong> originally published on <a href="http://wpdailybits.com">WP Daily Bits</a> (<a href="http://feeds.feedburner.com/wpdailybits">RSS</a>) <br/> Follow us at <a href="https://www.facebook.com/pages/WpDailyBits/105300046209744">Facebook</a> | <a href="http://twitter.com/WPDailyBits">Twitter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://wpdailybits.com/blog/change-the-font-in-html-editor-in-wordpress-3-3/545/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>How to Remove the Width and Height Attributes From WP Image Uploader</title>
		<link>http://wpdailybits.com/blog/remove-the-width-and-height-attributes-from-wp-image-uploader/539?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=remove-the-width-and-height-attributes-from-wp-image-uploader</link>
		<comments>http://wpdailybits.com/blog/remove-the-width-and-height-attributes-from-wp-image-uploader/539#comments</comments>
		<pubDate>Mon, 16 Jan 2012 05:52:51 +0000</pubDate>
		<dc:creator>Damien</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[attribute]]></category>
		<category><![CDATA[height]]></category>
		<category><![CDATA[html tag]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[width]]></category>

		<guid isPermaLink="false">http://wpdailybits.com/?p=539</guid>
		<description><![CDATA[If you upload images via the WordPress image uploader and insert it into your post, it will include the image width and height attribute in the html &#60;img&#62; tag. Here&#8217;s what it will look like. &#60;img src=&#34;path/to/your/image&#34; width=&#34;123&#34; height=&#34;456&#34; class=&#34;aligncenter &#8230; <a href="http://wpdailybits.com/blog/remove-the-width-and-height-attributes-from-wp-image-uploader/539">Continue reading <span class="meta-nav">&#8594;</span></a><p><div style="float:left;margin-bottom:10px"><a href="http://api.tweetmeme.com/share?url=http://wpdailybits.com/blog/remove-the-width-and-height-attributes-from-wp-image-uploader/539&amp;service=bit.ly" target="_blank"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://wpdailybits.com/blog/remove-the-width-and-height-attributes-from-wp-image-uploader/539" style="border:none;margin-right:5px" width="51" height="61"></a><a href="http://digg.com/tools/diggthis/login?url=http://wpdailybits.com/blog/remove-the-width-and-height-attributes-from-wp-image-uploader/539" target="_blank"><img src="http://images.maketecheasier.com/diggme.png" style="border:none;margin-right:5px" ></a><a href="http://www.facebook.com/sharer.php?u=http://wpdailybits.com/blog/remove-the-width-and-height-attributes-from-wp-image-uploader/539" target="_blank"><img src="http://images.maketecheasier.com/fb.jpg" style="border:none;margin-right:5px" ></a><a href="http://www.google.com/reader/link?url=http://wpdailybits.com/blog/remove-the-width-and-height-attributes-from-wp-image-uploader/539&amp;title=How+to+Remove+the+Width+and+Height+Attributes+From+WP+Image+Uploader&amp;srcTitle=MakeTechEasier.com" target="_blank"><img src="http://images.maketecheasier.com/gbuzz-feed.png" style="border:none;margin-right:5px" ></a><a href="http://www.stumbleupon.com/submit?url=http://wpdailybits.com/blog/remove-the-width-and-height-attributes-from-wp-image-uploader/539" target="_blank"><img src="http://images.maketecheasier.com/stumble.png"></a></div><div style="clear:both"></div> <strong><a href="http://wpdailybits.com/blog/remove-the-width-and-height-attributes-from-wp-image-uploader/539">How to Remove the Width and Height Attributes From WP Image Uploader</a></strong> originally published on <a href="http://wpdailybits.com">WP Daily Bits</a> (<a href="http://feeds.feedburner.com/wpdailybits">RSS</a>) <br/> Follow us at <a href="https://www.facebook.com/pages/WpDailyBits/105300046209744">Facebook</a> | <a href="http://twitter.com/WPDailyBits">Twitter</a></p>
]]></description>
				<content:encoded><![CDATA[<p>If you upload images via the WordPress image uploader and insert it into your post, it will include the image width and height attribute in the html &lt;img&gt; tag. Here&#8217;s what it will look like.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;img src=&quot;path/to/your/image&quot; width=&quot;123&quot; height=&quot;456&quot; class=&quot;aligncenter size-full&quot; alt=&quot;&quot; title=&quot;&quot;&gt;</pre></div></div>

<p>In most cases, this is absolutely alright. However, if you are using a responsive theme or are dealing with responsive web design, the &#8220;width&#8221; and &#8220;height&#8221; attribute will be a major roadblock that you need to get rid of. </p>
<p>Here&#8217;s how you can do it.<br />
<span id="more-539"></span><br />
1. Open your theme&#8217;s <code>functions.php</code> file.</p>
<p>2. Copy and paste the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">add_filter<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'post_thumbnail_html'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'remove_width_attribute'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">10</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
add_filter<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'image_send_to_editor'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'remove_width_attribute'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">10</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> remove_width_attribute<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$html</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$html</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'/(width|height)=\&quot;\d*\&quot;\s/'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$html</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$html</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>3. Save the changes.</p>
<p>That&#8217;s it. Next time when you insert image into the post via the WP image uploader, the width and height attribute will no longer be there.<br />
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li>No Related Posts</li>
</ul>
<p><div style="float:left;margin-bottom:10px"><a href="http://api.tweetmeme.com/share?url=http://wpdailybits.com/blog/remove-the-width-and-height-attributes-from-wp-image-uploader/539&amp;service=bit.ly" target="_blank"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://wpdailybits.com/blog/remove-the-width-and-height-attributes-from-wp-image-uploader/539" style="border:none;margin-right:5px" width="51" height="61"></a><a href="http://digg.com/tools/diggthis/login?url=http://wpdailybits.com/blog/remove-the-width-and-height-attributes-from-wp-image-uploader/539" target="_blank"><img src="http://images.maketecheasier.com/diggme.png" style="border:none;margin-right:5px" ></a><a href="http://www.facebook.com/sharer.php?u=http://wpdailybits.com/blog/remove-the-width-and-height-attributes-from-wp-image-uploader/539" target="_blank"><img src="http://images.maketecheasier.com/fb.jpg" style="border:none;margin-right:5px" ></a><a href="http://www.google.com/reader/link?url=http://wpdailybits.com/blog/remove-the-width-and-height-attributes-from-wp-image-uploader/539&amp;title=How+to+Remove+the+Width+and+Height+Attributes+From+WP+Image+Uploader&amp;srcTitle=MakeTechEasier.com" target="_blank"><img src="http://images.maketecheasier.com/gbuzz-feed.png" style="border:none;margin-right:5px" ></a><a href="http://www.stumbleupon.com/submit?url=http://wpdailybits.com/blog/remove-the-width-and-height-attributes-from-wp-image-uploader/539" target="_blank"><img src="http://images.maketecheasier.com/stumble.png"></a></div><div style="clear:both"></div> <strong><a href="http://wpdailybits.com/blog/remove-the-width-and-height-attributes-from-wp-image-uploader/539">How to Remove the Width and Height Attributes From WP Image Uploader</a></strong> originally published on <a href="http://wpdailybits.com">WP Daily Bits</a> (<a href="http://feeds.feedburner.com/wpdailybits">RSS</a>) <br/> Follow us at <a href="https://www.facebook.com/pages/WpDailyBits/105300046209744">Facebook</a> | <a href="http://twitter.com/WPDailyBits">Twitter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://wpdailybits.com/blog/remove-the-width-and-height-attributes-from-wp-image-uploader/539/feed</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>How to Edit The Excerpt</title>
		<link>http://wpdailybits.com/blog/edit-the-excerpt/534?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=edit-the-excerpt</link>
		<comments>http://wpdailybits.com/blog/edit-the-excerpt/534#comments</comments>
		<pubDate>Mon, 09 Jan 2012 06:25:03 +0000</pubDate>
		<dc:creator>Damien</dc:creator>
				<category><![CDATA[Hacks]]></category>

		<guid isPermaLink="false">http://wpdailybits.com/?p=534</guid>
		<description><![CDATA[Changing the Excerpt length Paste this code to the functions.php of your theme folder. function custom_excerpt_length&#40; $length &#41; &#123; return 30; //change this number to determine the number of words returned &#125; add_filter&#40; 'excerpt_length', 'custom_excerpt_length', 999 &#41;; Adding &#8220;Read More&#8221; &#8230; <a href="http://wpdailybits.com/blog/edit-the-excerpt/534">Continue reading <span class="meta-nav">&#8594;</span></a><p><div style="float:left;margin-bottom:10px"><a href="http://api.tweetmeme.com/share?url=http://wpdailybits.com/blog/edit-the-excerpt/534&amp;service=bit.ly" target="_blank"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://wpdailybits.com/blog/edit-the-excerpt/534" style="border:none;margin-right:5px" width="51" height="61"></a><a href="http://digg.com/tools/diggthis/login?url=http://wpdailybits.com/blog/edit-the-excerpt/534" target="_blank"><img src="http://images.maketecheasier.com/diggme.png" style="border:none;margin-right:5px" ></a><a href="http://www.facebook.com/sharer.php?u=http://wpdailybits.com/blog/edit-the-excerpt/534" target="_blank"><img src="http://images.maketecheasier.com/fb.jpg" style="border:none;margin-right:5px" ></a><a href="http://www.google.com/reader/link?url=http://wpdailybits.com/blog/edit-the-excerpt/534&amp;title=How+to+Edit+The+Excerpt&amp;srcTitle=MakeTechEasier.com" target="_blank"><img src="http://images.maketecheasier.com/gbuzz-feed.png" style="border:none;margin-right:5px" ></a><a href="http://www.stumbleupon.com/submit?url=http://wpdailybits.com/blog/edit-the-excerpt/534" target="_blank"><img src="http://images.maketecheasier.com/stumble.png"></a></div><div style="clear:both"></div> <strong><a href="http://wpdailybits.com/blog/edit-the-excerpt/534">How to Edit The Excerpt</a></strong> originally published on <a href="http://wpdailybits.com">WP Daily Bits</a> (<a href="http://feeds.feedburner.com/wpdailybits">RSS</a>) <br/> Follow us at <a href="https://www.facebook.com/pages/WpDailyBits/105300046209744">Facebook</a> | <a href="http://twitter.com/WPDailyBits">Twitter</a></p>
]]></description>
				<content:encoded><![CDATA[<h2>Changing the Excerpt length</h2>
<p>Paste this code to the <code>functions.php</code> of your theme folder.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> custom_excerpt_length<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$length</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #cc66cc;">30</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//change this number to determine the number of words returned</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'excerpt_length'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'custom_excerpt_length'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">999</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h2>Adding &#8220;Read More&#8221; link after the excerpt</h2>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> new_excerpt_more<span style="color: #009900;">&#40;</span><span style="color: #000088;">$more</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">'... &lt;span class=&quot;read-more&quot;&gt;&lt;a href=&quot;'</span><span style="color: #339933;">.</span> get_permalink<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot;&gt;Read more  &amp;raquo;&lt;/a&gt;&lt;/span&gt;'</span><span style="color: #339933;">;</span>
       <span style="color: #666666; font-style: italic;">//if you just want to remove the [...] after the excerpt, use 'return '';'</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'excerpt_more'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'new_excerpt_more'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>That&#8217;s it.<br />
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li>No Related Posts</li>
</ul>
<p><div style="float:left;margin-bottom:10px"><a href="http://api.tweetmeme.com/share?url=http://wpdailybits.com/blog/edit-the-excerpt/534&amp;service=bit.ly" target="_blank"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://wpdailybits.com/blog/edit-the-excerpt/534" style="border:none;margin-right:5px" width="51" height="61"></a><a href="http://digg.com/tools/diggthis/login?url=http://wpdailybits.com/blog/edit-the-excerpt/534" target="_blank"><img src="http://images.maketecheasier.com/diggme.png" style="border:none;margin-right:5px" ></a><a href="http://www.facebook.com/sharer.php?u=http://wpdailybits.com/blog/edit-the-excerpt/534" target="_blank"><img src="http://images.maketecheasier.com/fb.jpg" style="border:none;margin-right:5px" ></a><a href="http://www.google.com/reader/link?url=http://wpdailybits.com/blog/edit-the-excerpt/534&amp;title=How+to+Edit+The+Excerpt&amp;srcTitle=MakeTechEasier.com" target="_blank"><img src="http://images.maketecheasier.com/gbuzz-feed.png" style="border:none;margin-right:5px" ></a><a href="http://www.stumbleupon.com/submit?url=http://wpdailybits.com/blog/edit-the-excerpt/534" target="_blank"><img src="http://images.maketecheasier.com/stumble.png"></a></div><div style="clear:both"></div> <strong><a href="http://wpdailybits.com/blog/edit-the-excerpt/534">How to Edit The Excerpt</a></strong> originally published on <a href="http://wpdailybits.com">WP Daily Bits</a> (<a href="http://feeds.feedburner.com/wpdailybits">RSS</a>) <br/> Follow us at <a href="https://www.facebook.com/pages/WpDailyBits/105300046209744">Facebook</a> | <a href="http://twitter.com/WPDailyBits">Twitter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://wpdailybits.com/blog/edit-the-excerpt/534/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Remove Miscellaneous Widgets From WP Dashboard</title>
		<link>http://wpdailybits.com/blog/remove-miscellaneous-widgets-from-wp-dashboard/518?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=remove-miscellaneous-widgets-from-wp-dashboard</link>
		<comments>http://wpdailybits.com/blog/remove-miscellaneous-widgets-from-wp-dashboard/518#comments</comments>
		<pubDate>Sun, 03 Apr 2011 14:51:15 +0000</pubDate>
		<dc:creator>Damien</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[dashboard]]></category>
		<category><![CDATA[widgets]]></category>

		<guid isPermaLink="false">http://wpdailybits.com/?p=518</guid>
		<description><![CDATA[When you are logged into your WordPress dashboard, you may have noticed that there are many useless widgets that you don&#8217;t even bother looking at it, but it is taking up a long time to load. While you can hide &#8230; <a href="http://wpdailybits.com/blog/remove-miscellaneous-widgets-from-wp-dashboard/518">Continue reading <span class="meta-nav">&#8594;</span></a><p><div style="float:left;margin-bottom:10px"><a href="http://api.tweetmeme.com/share?url=http://wpdailybits.com/blog/remove-miscellaneous-widgets-from-wp-dashboard/518&amp;service=bit.ly" target="_blank"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://wpdailybits.com/blog/remove-miscellaneous-widgets-from-wp-dashboard/518" style="border:none;margin-right:5px" width="51" height="61"></a><a href="http://digg.com/tools/diggthis/login?url=http://wpdailybits.com/blog/remove-miscellaneous-widgets-from-wp-dashboard/518" target="_blank"><img src="http://images.maketecheasier.com/diggme.png" style="border:none;margin-right:5px" ></a><a href="http://www.facebook.com/sharer.php?u=http://wpdailybits.com/blog/remove-miscellaneous-widgets-from-wp-dashboard/518" target="_blank"><img src="http://images.maketecheasier.com/fb.jpg" style="border:none;margin-right:5px" ></a><a href="http://www.google.com/reader/link?url=http://wpdailybits.com/blog/remove-miscellaneous-widgets-from-wp-dashboard/518&amp;title=How+to+Remove+Miscellaneous+Widgets+From+WP+Dashboard&amp;srcTitle=MakeTechEasier.com" target="_blank"><img src="http://images.maketecheasier.com/gbuzz-feed.png" style="border:none;margin-right:5px" ></a><a href="http://www.stumbleupon.com/submit?url=http://wpdailybits.com/blog/remove-miscellaneous-widgets-from-wp-dashboard/518" target="_blank"><img src="http://images.maketecheasier.com/stumble.png"></a></div><div style="clear:both"></div> <strong><a href="http://wpdailybits.com/blog/remove-miscellaneous-widgets-from-wp-dashboard/518">How to Remove Miscellaneous Widgets From WP Dashboard</a></strong> originally published on <a href="http://wpdailybits.com">WP Daily Bits</a> (<a href="http://feeds.feedburner.com/wpdailybits">RSS</a>) <br/> Follow us at <a href="https://www.facebook.com/pages/WpDailyBits/105300046209744">Facebook</a> | <a href="http://twitter.com/WPDailyBits">Twitter</a></p>
]]></description>
				<content:encoded><![CDATA[<p><img src="http://images.wpdailybits.com/files/2011/04/widgets-main.png" alt="widgets-main" title="widgets-main" width="233" height="126" class="alignleft size-full wp-image-521" />When you are logged into your WordPress dashboard, you may have noticed that there are many useless widgets that you don&#8217;t even bother looking at it, but it is taking up a long time to load. While you can hide them using the screen options, it is better to remove them for good and prevent them from taking up your precious load time.</p>
<p>Here is how you remove them:</p>
<p>In your <code>functions.php</code>, copy and paste the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_dashboard_setup'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'remove_dashboard_widgets'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> remove_dashboard_widgets<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$wp_meta_boxes</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wp_meta_boxes</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dashboard'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'side'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'core'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dashboard_quick_press'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wp_meta_boxes</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dashboard'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'normal'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'core'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dashboard_incoming_links'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wp_meta_boxes</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dashboard'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'normal'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'core'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dashboard_right_now'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wp_meta_boxes</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dashboard'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'normal'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'core'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dashboard_plugins'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wp_meta_boxes</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dashboard'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'normal'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'core'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dashboard_recent_drafts'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wp_meta_boxes</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dashboard'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'normal'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'core'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dashboard_recent_comments'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wp_meta_boxes</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dashboard'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'side'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'core'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dashboard_primary'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wp_meta_boxes</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dashboard'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'side'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'core'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'dashboard_secondary'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>What the above code does is to unset the widgets from the dashboard array so that they won&#8217;t get loaded in the frontend. If you want to preserve any of the widgets, simply remove them from the above code. <span id="more-518"></span><br />
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li>No Related Posts</li>
</ul>
<p><div style="float:left;margin-bottom:10px"><a href="http://api.tweetmeme.com/share?url=http://wpdailybits.com/blog/remove-miscellaneous-widgets-from-wp-dashboard/518&amp;service=bit.ly" target="_blank"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://wpdailybits.com/blog/remove-miscellaneous-widgets-from-wp-dashboard/518" style="border:none;margin-right:5px" width="51" height="61"></a><a href="http://digg.com/tools/diggthis/login?url=http://wpdailybits.com/blog/remove-miscellaneous-widgets-from-wp-dashboard/518" target="_blank"><img src="http://images.maketecheasier.com/diggme.png" style="border:none;margin-right:5px" ></a><a href="http://www.facebook.com/sharer.php?u=http://wpdailybits.com/blog/remove-miscellaneous-widgets-from-wp-dashboard/518" target="_blank"><img src="http://images.maketecheasier.com/fb.jpg" style="border:none;margin-right:5px" ></a><a href="http://www.google.com/reader/link?url=http://wpdailybits.com/blog/remove-miscellaneous-widgets-from-wp-dashboard/518&amp;title=How+to+Remove+Miscellaneous+Widgets+From+WP+Dashboard&amp;srcTitle=MakeTechEasier.com" target="_blank"><img src="http://images.maketecheasier.com/gbuzz-feed.png" style="border:none;margin-right:5px" ></a><a href="http://www.stumbleupon.com/submit?url=http://wpdailybits.com/blog/remove-miscellaneous-widgets-from-wp-dashboard/518" target="_blank"><img src="http://images.maketecheasier.com/stumble.png"></a></div><div style="clear:both"></div> <strong><a href="http://wpdailybits.com/blog/remove-miscellaneous-widgets-from-wp-dashboard/518">How to Remove Miscellaneous Widgets From WP Dashboard</a></strong> originally published on <a href="http://wpdailybits.com">WP Daily Bits</a> (<a href="http://feeds.feedburner.com/wpdailybits">RSS</a>) <br/> Follow us at <a href="https://www.facebook.com/pages/WpDailyBits/105300046209744">Facebook</a> | <a href="http://twitter.com/WPDailyBits">Twitter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://wpdailybits.com/blog/remove-miscellaneous-widgets-from-wp-dashboard/518/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Show The Most Commented Posts In The Sidebar</title>
		<link>http://wpdailybits.com/blog/show-most-commented-posts-in-sidebar/508?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=show-most-commented-posts-in-sidebar</link>
		<comments>http://wpdailybits.com/blog/show-most-commented-posts-in-sidebar/508#comments</comments>
		<pubDate>Fri, 04 Mar 2011 16:00:13 +0000</pubDate>
		<dc:creator>Damien</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[comments]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[popular]]></category>
		<category><![CDATA[posts]]></category>
		<category><![CDATA[sidebar]]></category>
		<category><![CDATA[widget]]></category>

		<guid isPermaLink="false">http://wpdailybits.com/?p=508</guid>
		<description><![CDATA[There are many ways to gauge the popularity of a post and the easiest way of them all is to check the posts with the most number of comments. Here&#8217;s now you can display the popular posts (most commented) in &#8230; <a href="http://wpdailybits.com/blog/show-most-commented-posts-in-sidebar/508">Continue reading <span class="meta-nav">&#8594;</span></a><p><div style="float:left;margin-bottom:10px"><a href="http://api.tweetmeme.com/share?url=http://wpdailybits.com/blog/show-most-commented-posts-in-sidebar/508&amp;service=bit.ly" target="_blank"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://wpdailybits.com/blog/show-most-commented-posts-in-sidebar/508" style="border:none;margin-right:5px" width="51" height="61"></a><a href="http://digg.com/tools/diggthis/login?url=http://wpdailybits.com/blog/show-most-commented-posts-in-sidebar/508" target="_blank"><img src="http://images.maketecheasier.com/diggme.png" style="border:none;margin-right:5px" ></a><a href="http://www.facebook.com/sharer.php?u=http://wpdailybits.com/blog/show-most-commented-posts-in-sidebar/508" target="_blank"><img src="http://images.maketecheasier.com/fb.jpg" style="border:none;margin-right:5px" ></a><a href="http://www.google.com/reader/link?url=http://wpdailybits.com/blog/show-most-commented-posts-in-sidebar/508&amp;title=How+to+Show+The+Most+Commented+Posts+In+The+Sidebar&amp;srcTitle=MakeTechEasier.com" target="_blank"><img src="http://images.maketecheasier.com/gbuzz-feed.png" style="border:none;margin-right:5px" ></a><a href="http://www.stumbleupon.com/submit?url=http://wpdailybits.com/blog/show-most-commented-posts-in-sidebar/508" target="_blank"><img src="http://images.maketecheasier.com/stumble.png"></a></div><div style="clear:both"></div> <strong><a href="http://wpdailybits.com/blog/show-most-commented-posts-in-sidebar/508">How to Show The Most Commented Posts In The Sidebar</a></strong> originally published on <a href="http://wpdailybits.com">WP Daily Bits</a> (<a href="http://feeds.feedburner.com/wpdailybits">RSS</a>) <br/> Follow us at <a href="https://www.facebook.com/pages/WpDailyBits/105300046209744">Facebook</a> | <a href="http://twitter.com/WPDailyBits">Twitter</a></p>
]]></description>
				<content:encoded><![CDATA[<p>There are many ways to gauge the popularity of a post and the easiest way of them all is to check the posts with the most number of comments. </p>
<p>Here&#8217;s now you can display the popular posts (most commented) in the sidebar.<br />
<span id="more-508"></span><br />
Open your <code>functions.php</code> file and copy the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'widget_text'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'do_shortcode'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
add_shortcode<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'show_popular_posts'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'wpdailybits_popular_posts'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> wpdailybits_popular_posts<span style="color: #009900;">&#40;</span><span style="color: #000088;">$atts</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>   <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">;</span>  	
    <span style="color: #990000;">extract</span><span style="color: #009900;">&#40;</span>shortcode_atts<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
		<span style="color: #0000ff;">'num'</span><span style="color: #339933;">=&gt;</span><span style="color: #cc66cc;">5</span>
	<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$atts</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$num</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$atts</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'num'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$posts</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_results</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT comment_count, ID, post_title FROM <span style="color: #006699; font-weight: bold;">$wpdb-&gt;posts</span> ORDER BY comment_count DESC LIMIT 0 ,  <span style="color: #006699; font-weight: bold;">$num</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  
    <span style="color: #000088;">$popularposts</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>    
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$posts</span><span style="color: #009900;">&#41;</span>        
    <span style="color: #009900;">&#123;</span>   <span style="color: #000088;">$popularposts</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;ul class=&quot;popularpostlist&quot;&gt;'</span><span style="color: #339933;">;</span>
	    <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$posts</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$post</span><span style="color: #009900;">&#41;</span> 
        <span style="color: #009900;">&#123;</span>   <span style="color: #000088;">$id</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">;</span>  
            <span style="color: #000088;">$title</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_title</span><span style="color: #339933;">;</span>  
            <span style="color: #000088;">$count</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">comment_count</span><span style="color: #339933;">;</span>  
            <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$count</span> <span style="color: #339933;">!=</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>  
              <span style="color: #000088;">$popularposts</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;li&gt;&lt;a href=&quot;'</span> <span style="color: #339933;">.</span> get_permalink<span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot; title=&quot;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$title</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot;&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$title</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' ('</span><span style="color: #339933;">.</span><span style="color: #000088;">$count</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' comments)&lt;/a&gt;&lt;/li&gt;'</span><span style="color: #339933;">;</span>  
            <span style="color: #009900;">&#125;</span>  
        <span style="color: #009900;">&#125;</span>    	
        <span style="color: #000088;">$popularposts</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;/ul&gt;'</span><span style="color: #339933;">;</span> 
    <span style="color: #009900;">&#125;</span>	
    wp_reset_query<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$popularposts</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Then in the widget area of WordPress, drag a new  text widget to the sidebar and enter <code>[show_popular_posts num="5"]</code> where <em>num</em> is the number of posts to show.</p>
<h3>Showing most commented posts from the last 3 months</h3>
<p>To show the most commented posts only from the last 3 months, use the following code instead:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'widget_text'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'do_shortcode'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
add_shortcode<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'show_popular_posts'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'wpdailybits_popular_posts'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> wpdailybits_popular_posts<span style="color: #009900;">&#40;</span><span style="color: #000088;">$atts</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>   <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">;</span>  	
    <span style="color: #990000;">extract</span><span style="color: #009900;">&#40;</span>shortcode_atts<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
		<span style="color: #0000ff;">'num'</span><span style="color: #339933;">=&gt;</span><span style="color: #cc66cc;">5</span>
	<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$atts</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$num</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$atts</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'num'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$last3months</span> <span style="color: #339933;">=</span> <span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Y-m-d'</span><span style="color: #339933;">,</span> <span style="color: #990000;">mktime</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;m&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;d&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Y&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
    <span style="color: #000088;">$posts</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_results</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT comment_count, ID, post_title FROM <span style="color: #006699; font-weight: bold;">$wpdb-&gt;posts</span> WHERE post_date &gt; '<span style="color: #006699; font-weight: bold;">$last3months</span>' ORDER BY comment_count DESC LIMIT 0 ,  <span style="color: #006699; font-weight: bold;">$num</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  
    <span style="color: #000088;">$discussion</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>    
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$posts</span><span style="color: #009900;">&#41;</span>        
    <span style="color: #009900;">&#123;</span>   <span style="color: #000088;">$discussion</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;ul class=&quot;popularpostlist&quot;&gt;'</span><span style="color: #339933;">;</span>
	    <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$posts</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$post</span><span style="color: #009900;">&#41;</span> 
        <span style="color: #009900;">&#123;</span>   <span style="color: #000088;">$id</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">;</span>  
            <span style="color: #000088;">$title</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_title</span><span style="color: #339933;">;</span>  
            <span style="color: #000088;">$count</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">comment_count</span><span style="color: #339933;">;</span>  
            <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$count</span> <span style="color: #339933;">!=</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>  
              <span style="color: #000088;">$discussion</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;li&gt;&lt;a href=&quot;'</span> <span style="color: #339933;">.</span> get_permalink<span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot; title=&quot;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$title</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot;&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$title</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' ('</span><span style="color: #339933;">.</span><span style="color: #000088;">$count</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' comments)&lt;/a&gt;&lt;/li&gt;'</span><span style="color: #339933;">;</span>  
            <span style="color: #009900;">&#125;</span>  
        <span style="color: #009900;">&#125;</span>    	
        <span style="color: #000088;">$discussion</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;/ul&gt;'</span><span style="color: #339933;">;</span> 
    <span style="color: #009900;">&#125;</span>	
    wp_reset_query<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$discussion</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>It should show up something like this:</p>
<p><img src="http://images.wpdailybits.com/files/2011/03/popular-posts.png" alt="popular-posts" title="popular-posts" width="425" height="300" class="aligncenter size-full wp-image-510" /></p>
<p>That&#8217;s it.<br />
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://wpdailybits.com/blog/parse-embed-rss-feed-into-your-wp-theme/414' title='How to Parse And Embed RSS Feed Into Your WP Theme'>How to Parse And Embed RSS Feed Into Your WP Theme</a></li>
<li><a href='http://wpdailybits.com/blog/disable-admin-bar/464' title='WordPress 3.1 Very Slow? Disable The Admin Bar [Quick Tip]'>WordPress 3.1 Very Slow? Disable The Admin Bar [Quick Tip]</a></li>
<li><a href='http://wpdailybits.com/blog/add-jquery-1-5-to-wordpress/408' title='Snippet: How to Add jQuery 1.5 to WordPress'>Snippet: How to Add jQuery 1.5 to WordPress</a></li>
<li><a href='http://wpdailybits.com/blog/create-own-related-posts-template/206' title='How to Show Related Posts in WordPress Without Using Plugin'>How to Show Related Posts in WordPress Without Using Plugin</a></li>
<li><a href='http://wpdailybits.com/blog/notify-post-author-for-new-comment-disqus/45' title='How to Make Disqus Notify the Post Author When a New Comment Is Posted?'>How to Make Disqus Notify the Post Author When a New Comment Is Posted?</a></li>
</ul>
<p><div style="float:left;margin-bottom:10px"><a href="http://api.tweetmeme.com/share?url=http://wpdailybits.com/blog/show-most-commented-posts-in-sidebar/508&amp;service=bit.ly" target="_blank"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://wpdailybits.com/blog/show-most-commented-posts-in-sidebar/508" style="border:none;margin-right:5px" width="51" height="61"></a><a href="http://digg.com/tools/diggthis/login?url=http://wpdailybits.com/blog/show-most-commented-posts-in-sidebar/508" target="_blank"><img src="http://images.maketecheasier.com/diggme.png" style="border:none;margin-right:5px" ></a><a href="http://www.facebook.com/sharer.php?u=http://wpdailybits.com/blog/show-most-commented-posts-in-sidebar/508" target="_blank"><img src="http://images.maketecheasier.com/fb.jpg" style="border:none;margin-right:5px" ></a><a href="http://www.google.com/reader/link?url=http://wpdailybits.com/blog/show-most-commented-posts-in-sidebar/508&amp;title=How+to+Show+The+Most+Commented+Posts+In+The+Sidebar&amp;srcTitle=MakeTechEasier.com" target="_blank"><img src="http://images.maketecheasier.com/gbuzz-feed.png" style="border:none;margin-right:5px" ></a><a href="http://www.stumbleupon.com/submit?url=http://wpdailybits.com/blog/show-most-commented-posts-in-sidebar/508" target="_blank"><img src="http://images.maketecheasier.com/stumble.png"></a></div><div style="clear:both"></div> <strong><a href="http://wpdailybits.com/blog/show-most-commented-posts-in-sidebar/508">How to Show The Most Commented Posts In The Sidebar</a></strong> originally published on <a href="http://wpdailybits.com">WP Daily Bits</a> (<a href="http://feeds.feedburner.com/wpdailybits">RSS</a>) <br/> Follow us at <a href="https://www.facebook.com/pages/WpDailyBits/105300046209744">Facebook</a> | <a href="http://twitter.com/WPDailyBits">Twitter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://wpdailybits.com/blog/show-most-commented-posts-in-sidebar/508/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Redirect a Page/Post to External Site</title>
		<link>http://wpdailybits.com/blog/redirect-a-page-post-to-external-site/369?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=redirect-a-page-post-to-external-site</link>
		<comments>http://wpdailybits.com/blog/redirect-a-page-post-to-external-site/369#comments</comments>
		<pubDate>Thu, 03 Mar 2011 15:58:44 +0000</pubDate>
		<dc:creator>Damien Oh</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[external]]></category>
		<category><![CDATA[permalink]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[title]]></category>

		<guid isPermaLink="false">http://wp.maketecheasier.com/?p=369</guid>
		<description><![CDATA[Usually when you publish a new post, the post will be pushed to the top of the list in the front page. When your reader click the title link, it will bring them to the full article. Now, what if &#8230; <a href="http://wpdailybits.com/blog/redirect-a-page-post-to-external-site/369">Continue reading <span class="meta-nav">&#8594;</span></a><p><div style="float:left;margin-bottom:10px"><a href="http://api.tweetmeme.com/share?url=http://wpdailybits.com/blog/redirect-a-page-post-to-external-site/369&amp;service=bit.ly" target="_blank"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://wpdailybits.com/blog/redirect-a-page-post-to-external-site/369" style="border:none;margin-right:5px" width="51" height="61"></a><a href="http://digg.com/tools/diggthis/login?url=http://wpdailybits.com/blog/redirect-a-page-post-to-external-site/369" target="_blank"><img src="http://images.maketecheasier.com/diggme.png" style="border:none;margin-right:5px" ></a><a href="http://www.facebook.com/sharer.php?u=http://wpdailybits.com/blog/redirect-a-page-post-to-external-site/369" target="_blank"><img src="http://images.maketecheasier.com/fb.jpg" style="border:none;margin-right:5px" ></a><a href="http://www.google.com/reader/link?url=http://wpdailybits.com/blog/redirect-a-page-post-to-external-site/369&amp;title=How+to+Redirect+a+Page%2FPost+to+External+Site&amp;srcTitle=MakeTechEasier.com" target="_blank"><img src="http://images.maketecheasier.com/gbuzz-feed.png" style="border:none;margin-right:5px" ></a><a href="http://www.stumbleupon.com/submit?url=http://wpdailybits.com/blog/redirect-a-page-post-to-external-site/369" target="_blank"><img src="http://images.maketecheasier.com/stumble.png"></a></div><div style="clear:both"></div> <strong><a href="http://wpdailybits.com/blog/redirect-a-page-post-to-external-site/369">How to Redirect a Page/Post to External Site</a></strong> originally published on <a href="http://wpdailybits.com">WP Daily Bits</a> (<a href="http://feeds.feedburner.com/wpdailybits">RSS</a>) <br/> Follow us at <a href="https://www.facebook.com/pages/WpDailyBits/105300046209744">Facebook</a> | <a href="http://twitter.com/WPDailyBits">Twitter</a></p>
]]></description>
				<content:encoded><![CDATA[<p><img src="http://images.wpdailybits.com/files/2011/03/external-link.jpg" alt="external-link" title="external-link" width="200" height="113" class="alignleft size-full wp-image-500" />Usually when you publish a new post, the post will be pushed to the top of the list in the front page. When your reader click the title link, it will bring them to the full article. Now, what if you want the title of the post, when clicked, direct the reader to an external URL instead of the full article? How can you do it without utilizing a plugin?</p>
<p>We can use custom field to solve this. Here is how you can do so:<br />
<span id="more-369"></span><br />
Create a new post/page with excerpt/teaser  that you want to show your reader. At the custom field section, create a new custom field &#8220;<em>external_link</em>&#8221; and place the external URL in the value field. </p>
<p>Now open up your <code>index.php</code> file. At the part that display the post title, it should look something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;h2 class=&quot;entry-title&quot;&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; title=&quot;Permalink to <span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; rel=&quot;bookmark&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt;&lt;/h2&gt;</pre></div></div>

<p>Replace it with the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$external_link</span> <span style="color: #339933;">=</span> get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'external_link'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #000088;">$title_link</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$external_link</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">else</span>
		<span style="color: #000088;">$title_link</span> <span style="color: #339933;">=</span> get_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$title_link</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; title=&quot;Permalink to <span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; rel=&quot;bookmark&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt;&lt;/h2&gt;</pre></div></div>

<p>What the above code does is to check if there is any external link set for the current post. If yes, it will replace the title link with the external link. When your reader click on the link, he/she will be directed to the external URL.</p>
<p>You can use the above code in archive pages such as <code>category.php</code>, <code>tag.php</code>, <code>author.php</code> or <code>archives.php</code>.</p>
<p>To insert the post with external link in your feed, open the <code>functions.php</code> file and paste the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> wpdailybits_linkrss<span style="color: #009900;">&#40;</span><span style="color: #000088;">$content</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$wp_query</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$postid</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wp_query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$external_link</span> <span style="color: #339933;">=</span> get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$postid</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'external_link'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$external_link</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$external_link</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$content</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'the_permalink_rss'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'wpdailybits_linkrss'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>That&#8217;s it. The post should appear in your RSS feed with an external clickthrough link.</p>
<p>Image credit: <a href="http://www.flickr.com/photos/chrisdlugosz/3402955869" target="_blank"  rel="nofollow">chrisdlugosz</a><br />
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://wpdailybits.com/blog/create-new-permalink-rules/550' title='How to Create New Permalink Rules'>How to Create New Permalink Rules</a></li>
<li><a href='http://wpdailybits.com/blog/parse-embed-rss-feed-into-your-wp-theme/414' title='How to Parse And Embed RSS Feed Into Your WP Theme'>How to Parse And Embed RSS Feed Into Your WP Theme</a></li>
</ul>
<p><div style="float:left;margin-bottom:10px"><a href="http://api.tweetmeme.com/share?url=http://wpdailybits.com/blog/redirect-a-page-post-to-external-site/369&amp;service=bit.ly" target="_blank"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://wpdailybits.com/blog/redirect-a-page-post-to-external-site/369" style="border:none;margin-right:5px" width="51" height="61"></a><a href="http://digg.com/tools/diggthis/login?url=http://wpdailybits.com/blog/redirect-a-page-post-to-external-site/369" target="_blank"><img src="http://images.maketecheasier.com/diggme.png" style="border:none;margin-right:5px" ></a><a href="http://www.facebook.com/sharer.php?u=http://wpdailybits.com/blog/redirect-a-page-post-to-external-site/369" target="_blank"><img src="http://images.maketecheasier.com/fb.jpg" style="border:none;margin-right:5px" ></a><a href="http://www.google.com/reader/link?url=http://wpdailybits.com/blog/redirect-a-page-post-to-external-site/369&amp;title=How+to+Redirect+a+Page%2FPost+to+External+Site&amp;srcTitle=MakeTechEasier.com" target="_blank"><img src="http://images.maketecheasier.com/gbuzz-feed.png" style="border:none;margin-right:5px" ></a><a href="http://www.stumbleupon.com/submit?url=http://wpdailybits.com/blog/redirect-a-page-post-to-external-site/369" target="_blank"><img src="http://images.maketecheasier.com/stumble.png"></a></div><div style="clear:both"></div> <strong><a href="http://wpdailybits.com/blog/redirect-a-page-post-to-external-site/369">How to Redirect a Page/Post to External Site</a></strong> originally published on <a href="http://wpdailybits.com">WP Daily Bits</a> (<a href="http://feeds.feedburner.com/wpdailybits">RSS</a>) <br/> Follow us at <a href="https://www.facebook.com/pages/WpDailyBits/105300046209744">Facebook</a> | <a href="http://twitter.com/WPDailyBits">Twitter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://wpdailybits.com/blog/redirect-a-page-post-to-external-site/369/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Create And Handle Custom Post Type</title>
		<link>http://wpdailybits.com/blog/handle-create-custom-post-type/440?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=handle-create-custom-post-type</link>
		<comments>http://wpdailybits.com/blog/handle-create-custom-post-type/440#comments</comments>
		<pubDate>Wed, 02 Mar 2011 16:09:38 +0000</pubDate>
		<dc:creator>Damien</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[categories]]></category>
		<category><![CDATA[custom post type]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[tags]]></category>

		<guid isPermaLink="false">http://wp.maketecheasier.com/?p=440</guid>
		<description><![CDATA[Custom Post Type was introduced in WordPress 3.0 to allow the users to define different post type within a blog. For example, if you are a chef looking to open new cooking classes and also to share your recipes with &#8230; <a href="http://wpdailybits.com/blog/handle-create-custom-post-type/440">Continue reading <span class="meta-nav">&#8594;</span></a><p><div style="float:left;margin-bottom:10px"><a href="http://api.tweetmeme.com/share?url=http://wpdailybits.com/blog/handle-create-custom-post-type/440&amp;service=bit.ly" target="_blank"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://wpdailybits.com/blog/handle-create-custom-post-type/440" style="border:none;margin-right:5px" width="51" height="61"></a><a href="http://digg.com/tools/diggthis/login?url=http://wpdailybits.com/blog/handle-create-custom-post-type/440" target="_blank"><img src="http://images.maketecheasier.com/diggme.png" style="border:none;margin-right:5px" ></a><a href="http://www.facebook.com/sharer.php?u=http://wpdailybits.com/blog/handle-create-custom-post-type/440" target="_blank"><img src="http://images.maketecheasier.com/fb.jpg" style="border:none;margin-right:5px" ></a><a href="http://www.google.com/reader/link?url=http://wpdailybits.com/blog/handle-create-custom-post-type/440&amp;title=How+to+Create+And+Handle+Custom+Post+Type&amp;srcTitle=MakeTechEasier.com" target="_blank"><img src="http://images.maketecheasier.com/gbuzz-feed.png" style="border:none;margin-right:5px" ></a><a href="http://www.stumbleupon.com/submit?url=http://wpdailybits.com/blog/handle-create-custom-post-type/440" target="_blank"><img src="http://images.maketecheasier.com/stumble.png"></a></div><div style="clear:both"></div> <strong><a href="http://wpdailybits.com/blog/handle-create-custom-post-type/440">How to Create And Handle Custom Post Type</a></strong> originally published on <a href="http://wpdailybits.com">WP Daily Bits</a> (<a href="http://feeds.feedburner.com/wpdailybits">RSS</a>) <br/> Follow us at <a href="https://www.facebook.com/pages/WpDailyBits/105300046209744">Facebook</a> | <a href="http://twitter.com/WPDailyBits">Twitter</a></p>
]]></description>
				<content:encoded><![CDATA[<p><img src="http://images.wpdailybits.com/files/2011/03/customposttype-sidebar.png" alt="customposttype-sidebar" title="customposttype-sidebar" width="172" height="178" class="alignleft size-full wp-image-484" />Custom Post Type was introduced in WordPress 3.0 to allow the users to define different post type within a blog. For example, if you are a chef looking to open new cooking classes and also to share your recipes with others, you can define a post type call &#8220;Classes&#8221; where you announce the availability of new cooking class and another post type call &#8220;Recipe&#8221; and share your recipe with your readers.</p>
<p>WordPress doesn&#8217;t come with an easy way for the normal users to create custom post type, but luckily there is a useful plugin for that.<br />
<span id="more-440"></span><br />
<a href="http://wordpress.org/extend/plugins/custom-post-type-ui/">Custom Post Type UI</a> is a WordPress plugin that allows you to create custom post type with a few clicks. It is pretty comprehensive and easy to use. </p>
<p>After installing (and activating) Custom Post Type UI, go to &#8220;<em>Custom Post Tpe -> Add New</em>&#8220;.</p>
<p><img src="http://images.wpdailybits.com/files/2011/03/customposttype-main.png" alt="customposttype-main" title="customposttype-main" width="600" height="311" class="aligncenter size-full wp-image-476" /></p>
<p>On the left side is where you create custom Post Type and the right side is where you create custom taxonomies for the custom post type.</p>
<p>To create a new custom post type, fill in the detail on the left pane and click &#8220;Create Custom Post Type&#8221;.</p>
<p><img src="http://images.wpdailybits.com/files/2011/03/customposttype-new-post-type.png" alt="customposttype-new-post-type" title="customposttype-new-post-type" width="530" height="481" class="aligncenter size-full wp-image-478" /></p>
<p>You can also click on the Advanced Options to see more configuration options. </p>
<p><img src="http://images.wpdailybits.com/files/2011/03/customposttype-advanced.png" alt="customposttype-advanced" title="customposttype-advanced" width="552" height="740" class="aligncenter size-full wp-image-479" /></p>
<p>Here is where you can change the permalink structure for your custom post type and also define what features it support. To get full capabilities, the best way is to check all the boxes beside the &#8220;Support&#8221; field. </p>
<h3>Adding Categories and Post Tags feature to Custom Post Type</h3>
<p>After we have added a new custom post type, we want to set up the categories and post tags feature for this post type. While we can reuse the existing categories and post type, it will cause an overlap with the default post structure. </p>
<p>Select the Post Type that this is attached to (the post type that you have just created).</p>
<p><img src="http://images.wpdailybits.com/files/2011/03/customposttype-taxomonies.png" alt="customposttype-taxomonies" title="customposttype-taxomonies" width="577" height="748" class="aligncenter size-full wp-image-483" /></p>
<p>To create a new custom taxomonies, fill in the detail on the right pane (Create Custom Taxomonies). Under the Advanced option, for Category-type feature, select &#8220;TRUE&#8221; for &#8220;Hierarchical&#8221;. For Post Tags feature, select &#8220;FALSE&#8221;.</p>
<p>When you are done, you should now see a new entry in your sidebar.</p>
<p><img src="http://images.wpdailybits.com/files/2011/03/customposttype-sidebar.png" alt="customposttype-sidebar" title="customposttype-sidebar" width="172" height="178" class="aligncenter size-full wp-image-484" /></p>
<p>You can now insert new Cooking Class or Recipe as per normal post.</p>
<h3>Viewing custom post type on the frontend</h3>
<p>In most cases, WordPress will load the custom post type with URL of the form: <em>http://your-site-url.com/post-type-rewrite-slug/your-permalink-structure</em>.</p>
<p>The &#8220;<code>post-type-rewrite-slug</code>&#8221; is the &#8220;Custom Rewrite Slug&#8221; that you have set when creating the custom post type. </p>
<p>However, some of you might see a &#8220;404 not found&#8221; page instead. This is because WordPress has not registered the permalink structure of the Custom Post Type yet. To fix this, in the Dashboard, go to &#8220;<em>Settings -> Permalink</em>&#8220;. Click the &#8220;Save Changes&#8221; button without changing anything. This will flush the permalink structure and register the custom post type rewrite slug.</p>
<p>Now, you should be able to view your custom post type on the frontend.<br />
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://wpdailybits.com/blog/merge-categories-in-wordpress/556' title='How to Merge Categories in WordPress'>How to Merge Categories in WordPress</a></li>
<li><a href='http://wpdailybits.com/blog/wordpress-3-1-hands-on/441' title='WordPress 3.1 Hands On'>WordPress 3.1 Hands On</a></li>
<li><a href='http://wpdailybits.com/blog/limit-the-jquery-lazy-load-plugin-to-content-area/167' title='Limit The jQuery Lazy Load Plugin to Operate Only In The Content Area'>Limit The jQuery Lazy Load Plugin to Operate Only In The Content Area</a></li>
<li><a href='http://wpdailybits.com/blog/test-new-plugins-and-themes-without-making-them-live/76' title='How to Test Drive New Plugins And Themes Without Making Them Live On Your Site'>How to Test Drive New Plugins And Themes Without Making Them Live On Your Site</a></li>
</ul>
<p><div style="float:left;margin-bottom:10px"><a href="http://api.tweetmeme.com/share?url=http://wpdailybits.com/blog/handle-create-custom-post-type/440&amp;service=bit.ly" target="_blank"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://wpdailybits.com/blog/handle-create-custom-post-type/440" style="border:none;margin-right:5px" width="51" height="61"></a><a href="http://digg.com/tools/diggthis/login?url=http://wpdailybits.com/blog/handle-create-custom-post-type/440" target="_blank"><img src="http://images.maketecheasier.com/diggme.png" style="border:none;margin-right:5px" ></a><a href="http://www.facebook.com/sharer.php?u=http://wpdailybits.com/blog/handle-create-custom-post-type/440" target="_blank"><img src="http://images.maketecheasier.com/fb.jpg" style="border:none;margin-right:5px" ></a><a href="http://www.google.com/reader/link?url=http://wpdailybits.com/blog/handle-create-custom-post-type/440&amp;title=How+to+Create+And+Handle+Custom+Post+Type&amp;srcTitle=MakeTechEasier.com" target="_blank"><img src="http://images.maketecheasier.com/gbuzz-feed.png" style="border:none;margin-right:5px" ></a><a href="http://www.stumbleupon.com/submit?url=http://wpdailybits.com/blog/handle-create-custom-post-type/440" target="_blank"><img src="http://images.maketecheasier.com/stumble.png"></a></div><div style="clear:both"></div> <strong><a href="http://wpdailybits.com/blog/handle-create-custom-post-type/440">How to Create And Handle Custom Post Type</a></strong> originally published on <a href="http://wpdailybits.com">WP Daily Bits</a> (<a href="http://feeds.feedburner.com/wpdailybits">RSS</a>) <br/> Follow us at <a href="https://www.facebook.com/pages/WpDailyBits/105300046209744">Facebook</a> | <a href="http://twitter.com/WPDailyBits">Twitter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://wpdailybits.com/blog/handle-create-custom-post-type/440/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress 3.1 Very Slow? Disable The Admin Bar [Quick Tip]</title>
		<link>http://wpdailybits.com/blog/disable-admin-bar/464?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=disable-admin-bar</link>
		<comments>http://wpdailybits.com/blog/disable-admin-bar/464#comments</comments>
		<pubDate>Tue, 01 Mar 2011 02:39:37 +0000</pubDate>
		<dc:creator>Damien</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[admin bar]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[slow]]></category>
		<category><![CDATA[WordPress 3.1]]></category>

		<guid isPermaLink="false">http://wpdailybits.com/?p=464</guid>
		<description><![CDATA[Ever since I upgraded to WordPress 3.1, I found that getting around in the admin area becomes very slow. Typing a post in the text editor is extremely laggy and becoming more of a nightmare. Apparently. this was due to &#8230; <a href="http://wpdailybits.com/blog/disable-admin-bar/464">Continue reading <span class="meta-nav">&#8594;</span></a><p><div style="float:left;margin-bottom:10px"><a href="http://api.tweetmeme.com/share?url=http://wpdailybits.com/blog/disable-admin-bar/464&amp;service=bit.ly" target="_blank"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://wpdailybits.com/blog/disable-admin-bar/464" style="border:none;margin-right:5px" width="51" height="61"></a><a href="http://digg.com/tools/diggthis/login?url=http://wpdailybits.com/blog/disable-admin-bar/464" target="_blank"><img src="http://images.maketecheasier.com/diggme.png" style="border:none;margin-right:5px" ></a><a href="http://www.facebook.com/sharer.php?u=http://wpdailybits.com/blog/disable-admin-bar/464" target="_blank"><img src="http://images.maketecheasier.com/fb.jpg" style="border:none;margin-right:5px" ></a><a href="http://www.google.com/reader/link?url=http://wpdailybits.com/blog/disable-admin-bar/464&amp;title=WordPress+3.1+Very+Slow%3F+Disable+The+Admin+Bar+%5BQuick+Tip%5D&amp;srcTitle=MakeTechEasier.com" target="_blank"><img src="http://images.maketecheasier.com/gbuzz-feed.png" style="border:none;margin-right:5px" ></a><a href="http://www.stumbleupon.com/submit?url=http://wpdailybits.com/blog/disable-admin-bar/464" target="_blank"><img src="http://images.maketecheasier.com/stumble.png"></a></div><div style="clear:both"></div> <strong><a href="http://wpdailybits.com/blog/disable-admin-bar/464">WordPress 3.1 Very Slow? Disable The Admin Bar [Quick Tip]</a></strong> originally published on <a href="http://wpdailybits.com">WP Daily Bits</a> (<a href="http://feeds.feedburner.com/wpdailybits">RSS</a>) <br/> Follow us at <a href="https://www.facebook.com/pages/WpDailyBits/105300046209744">Facebook</a> | <a href="http://twitter.com/WPDailyBits">Twitter</a></p>
]]></description>
				<content:encoded><![CDATA[<p>Ever since I upgraded to WordPress 3.1, I found that getting around in the admin area becomes very slow. Typing a post in the text editor is extremely laggy and becoming more of a nightmare. Apparently. this was due to the admin bar taking up the system resource. One good way is to disable it for good.</p>
<p>Here&#8217;s how you can disable the admin bar:<br />
<span id="more-464"></span><br />
Open the <code>functions.php</code> file in your theme.</p>
<p>Paste the following code at the end of the file:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">function hide_admin_bar_settings() {
?&gt;
	&lt;style type=&quot;text/css&quot;&gt;
		.show-admin-bar {display: none;}
	&lt;/style&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> disable_admin_bar<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    add_filter<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'show_admin_bar'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'__return_false'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'admin_print_scripts-profile.php'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'hide_admin_bar_settings'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'init'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'disable_admin_bar'</span> <span style="color: #339933;">,</span> <span style="color: #cc66cc;">9</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Save and replace the file in the server. That&#8217;s it. You should have a more responsive Admin Dashboard now.<br />
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://wpdailybits.com/blog/show-most-commented-posts-in-sidebar/508' title='How to Show The Most Commented Posts In The Sidebar'>How to Show The Most Commented Posts In The Sidebar</a></li>
<li><a href='http://wpdailybits.com/blog/wordpress-3-1-hands-on/441' title='WordPress 3.1 Hands On'>WordPress 3.1 Hands On</a></li>
<li><a href='http://wpdailybits.com/blog/add-jquery-1-5-to-wordpress/408' title='Snippet: How to Add jQuery 1.5 to WordPress'>Snippet: How to Add jQuery 1.5 to WordPress</a></li>
<li><a href='http://wpdailybits.com/blog/create-own-related-posts-template/206' title='How to Show Related Posts in WordPress Without Using Plugin'>How to Show Related Posts in WordPress Without Using Plugin</a></li>
</ul>
<p><div style="float:left;margin-bottom:10px"><a href="http://api.tweetmeme.com/share?url=http://wpdailybits.com/blog/disable-admin-bar/464&amp;service=bit.ly" target="_blank"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://wpdailybits.com/blog/disable-admin-bar/464" style="border:none;margin-right:5px" width="51" height="61"></a><a href="http://digg.com/tools/diggthis/login?url=http://wpdailybits.com/blog/disable-admin-bar/464" target="_blank"><img src="http://images.maketecheasier.com/diggme.png" style="border:none;margin-right:5px" ></a><a href="http://www.facebook.com/sharer.php?u=http://wpdailybits.com/blog/disable-admin-bar/464" target="_blank"><img src="http://images.maketecheasier.com/fb.jpg" style="border:none;margin-right:5px" ></a><a href="http://www.google.com/reader/link?url=http://wpdailybits.com/blog/disable-admin-bar/464&amp;title=WordPress+3.1+Very+Slow%3F+Disable+The+Admin+Bar+%5BQuick+Tip%5D&amp;srcTitle=MakeTechEasier.com" target="_blank"><img src="http://images.maketecheasier.com/gbuzz-feed.png" style="border:none;margin-right:5px" ></a><a href="http://www.stumbleupon.com/submit?url=http://wpdailybits.com/blog/disable-admin-bar/464" target="_blank"><img src="http://images.maketecheasier.com/stumble.png"></a></div><div style="clear:both"></div> <strong><a href="http://wpdailybits.com/blog/disable-admin-bar/464">WordPress 3.1 Very Slow? Disable The Admin Bar [Quick Tip]</a></strong> originally published on <a href="http://wpdailybits.com">WP Daily Bits</a> (<a href="http://feeds.feedburner.com/wpdailybits">RSS</a>) <br/> Follow us at <a href="https://www.facebook.com/pages/WpDailyBits/105300046209744">Facebook</a> | <a href="http://twitter.com/WPDailyBits">Twitter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://wpdailybits.com/blog/disable-admin-bar/464/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
