<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>PHP Magic Book | Free PHP Scripts, Tutorials and Downloads</title>
	
	<link>http://www.phpmagicbook.com</link>
	<description>PHP AtoZ Reloaded, free php tutorials, free php downloads, php scripts, PHP tips</description>
	<pubDate>Mon, 08 Jun 2009 16:55:35 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/phpmagicbook" type="application/rss+xml" /><feedburner:emailServiceId>phpmagicbook</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Customizing WordPress Tags Cloud - A Guide</title>
		<link>http://feedproxy.google.com/~r/phpmagicbook/~3/faOFXFqaC3M/</link>
		<comments>http://www.phpmagicbook.com/customizing-wordpress-tags-cloud-a-guide/#comments</comments>
		<pubDate>Sat, 14 Feb 2009 22:16:11 +0000</pubDate>
		<dc:creator>King</dc:creator>
		
		<category><![CDATA[Hacks]]></category>

		<category><![CDATA[WordPress]]></category>

		<category><![CDATA[blog]]></category>

		<category><![CDATA[customize]]></category>

		<category><![CDATA[Tricks]]></category>

		<category><![CDATA[wp]]></category>

		<guid isPermaLink="false">http://www.phpmagicbook.com/?p=389</guid>
		<description><![CDATA[
If you have already used some social networking website or you are a blogger then you definitely know what the tags are. WordPress offers Tags Cloud which can be customized the way you use it at your blog. By default WP Tag Cloud will generate limited number of tags in alphabetical order. Custom templates for [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.phpmagicbook.com/wp-content/uploads/2009/02/tags-cloud.jpg" alt="tags-cloud" title="tags-cloud" width="500" height="300" class="alignnone size-full wp-image-390" /></p>
<p>If you have already used some social networking website or you are a blogger then you definitely know what the tags are. WordPress offers Tags Cloud which can be customized the way you use it at your blog. By default WP Tag Cloud will generate limited number of tags in alphabetical order. Custom templates for tags can be made which means that you can have a full page of tags as you want it. Look at the <a href="http://www.phpmagicbook.com/404/" target="_blank">404 page of phpmagicbook</a>. I have used tags to give the users some more options to browse if he gets distracted by &#8216;page not found error&#8217;. I was thinking to give my users all tags option to click at any one. Okay now this is just one use. You can have your own customized tags page which can contain just tags and nothing more. We explore some ways about how we can customize tags/tags template/tags page at our WordPress blog.</p>
<p><span id="more-389"></span></p>
<h4>Default Tags Cloud</h4>
<p>Paste the following code anywhere in your blog theme&#8217;s template files (e.g. 404 page, single post page etc.) to see default tags cloud in action:</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: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_tag_cloud'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
wp_tag_cloud<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></pre></div></div>

<h4>Display All Tags</h4>
<p>Following code will give you all the WordPress tags which you have used in your blog.</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: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_tag_cloud'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
wp_tag_cloud<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'number=0'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h4>Define Custom Font Size in Tags Cloud</h4>
<p>Following code will determine the smallest and largest size in your tags cloud.</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: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_tag_cloud'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
wp_tag_cloud<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'smallest=8&amp;largest=22'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h4>Random Ordered Tags Cloud</h4>
<p>Following code will generate random tags cloud which will not be in alphabetical order.</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: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_tag_cloud'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
wp_tag_cloud<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'order=RAND'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h4>Tags Cloud Limited in Size &#038; Ordered by Number of Posts</h4>
<p>Following code will generate custom font sized tags cloud ordered by post frequency under a specific tag.</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: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_tag_cloud'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
wp_tag_cloud<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'smallest=8&amp;largest=22&amp;number=30&amp;orderby=count'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h4>Tags Cloud Format</h4>
<p>You can format Tags Cloud in <strong>flat</strong> (Default) format - separated by whitespace, <strong>list</strong> format and <strong>array</strong> format by using following method:</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: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_tag_cloud'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
wp_tag_cloud<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'format=list'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>And there is ASC (Default), DESC and RAND order for Tags display order.<br />
Exclude and Include option to exclude and include tags and more&#8230;</p>
<h4>Mixing Things Up</h4>
<p>And finally with a bit of a magic you can add the bits and bytes into a full story of customized Tags Cloud for your own blog. A possible combination of code and example:</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: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_tag_cloud'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
wp_tag_cloud<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'smallest=8&amp;largest=22&amp;unit=pt&amp;number=50&amp;format=flat&amp;orderby=name&amp;order=ASC&amp;exclude=garbagetag&amp;include=mytag'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Example: Browse Ajax Rain&#8217;s tags page to view the full tags option in action.</p>
<p><a rel="nofollow" target="_blank" href="http://www.ajaxrain.com/tagcloud.php" target="_blank"><img src="http://www.phpmagicbook.com/wp-content/uploads/2009/02/ajax-rain-tags-cloud.jpg" alt="ajax-rain-tags-cloud" title="ajax-rain-tags-cloud" width="500" height="400" class="alignnone size-full wp-image-391" /></a></p>
<p>WordPress has got complete guide about how you can create custom tags cloud page template or how you can customize tags cloud at your blog in a number of ways. Give it a try.</p>
<p><a rel="nofollow" target="_blank" href="http://codex.wordpress.org/Template_Tags/wp_tag_cloud" target="_blank"><img src="http://www.phpmagicbook.com/wp-content/uploads/2009/02/template-tags-resources.jpg" alt="template-tags-resources" title="template-tags-resources" width="500" height="424" class="alignnone size-full wp-image-392" /></a></p>
<p>Have your say! Do you like to customize Tags Cloud at your blog or this is not a necessary part?<br />
<h3>Related Posts</h3>
<ul class="related_post">
<li><a href="http://www.phpmagicbook.com/how-to-include-specific-file-in-wordpress-blog-template/" title="How to Include Specific File In WordPress Blog Template">How to Include Specific File In WordPress Blog Template</a></li>
<li><a href="http://www.phpmagicbook.com/how-to-display-some-content-at-homepage-single-post-of-blog/" title="How To Display Some Content at Just Home Page and Single Post of Blog">How To Display Some Content at Just Home Page and Single Post of Blog</a></li>
<li><a href="http://www.phpmagicbook.com/display-rss-feed-from-any-blog-on-your-wordpress-blog/" title="Display RSS Feed From Any Blog on Your WordPress Blog">Display RSS Feed From Any Blog on Your WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/provide-rss-feed-for-each-post-and-comment-at-your-wordpress-blog/" title="Provide RSS Feed for Each Post and Comment at Your WordPress Blog">Provide RSS Feed for Each Post and Comment at Your WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/remove-ads-for-registered-users-or-admin-on-wordpress-blog/" title="Remove Ads for Registered Users or Admin on WordPress Blog">Remove Ads for Registered Users or Admin on WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/remove-comments-section-from-your-wordpress-blog/" title="Remove Comments Section From Your WordPress Blog">Remove Comments Section From Your WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/insert-adsense-after-the-first-post-in-your-wordpress-blog/" title="Insert Adsense After the First Post in Your WordPress Blog">Insert Adsense After the First Post in Your WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/redirect-ugly-permalink-to-postname/" title="Redirect Ugly Permalink to Postname">Redirect Ugly Permalink to Postname</a></li>
<li><a href="http://www.phpmagicbook.com/optimize-blog-post-title-tag-for-seo/" title="Optimize Blog Post Title Tag For SEO">Optimize Blog Post Title Tag For SEO</a></li>
<li><a href="http://www.phpmagicbook.com/how-to-get-most-commented-posts-of-the-week-for-your-wordpress-blog/" title="How to Get Most Commented Posts of the Week for your WordPress Blog">How to Get Most Commented Posts of the Week for your WordPress Blog</a></li>
</ul>

	Tags: <a href="http://www.phpmagicbook.com/tag/blog/" title="blog" rel="tag">blog</a>, <a href="http://www.phpmagicbook.com/tag/customize/" title="customize" rel="tag">customize</a>, <a href="http://www.phpmagicbook.com/tag/tricks/" title="Tricks" rel="tag">Tricks</a>, <a href="http://www.phpmagicbook.com/tag/wordpress/" title="WordPress" rel="tag">WordPress</a>, <a href="http://www.phpmagicbook.com/tag/wp/" title="wp" rel="tag">wp</a><br />

<p><a href="http://feedads.g.doubleclick.net/~a/vQgDxCWWvydpMA91O3DHQ-jtwsQ/0/da"><img src="http://feedads.g.doubleclick.net/~a/vQgDxCWWvydpMA91O3DHQ-jtwsQ/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/vQgDxCWWvydpMA91O3DHQ-jtwsQ/1/da"><img src="http://feedads.g.doubleclick.net/~a/vQgDxCWWvydpMA91O3DHQ-jtwsQ/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.phpmagicbook.com/customizing-wordpress-tags-cloud-a-guide/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.phpmagicbook.com/customizing-wordpress-tags-cloud-a-guide/</feedburner:origLink></item>
		<item>
		<title>.htaccess Essential Tricks For Blog/Website Performance - Guide</title>
		<link>http://feedproxy.google.com/~r/phpmagicbook/~3/nCk8uZv7czo/</link>
		<comments>http://www.phpmagicbook.com/htaccess-essential-tricks-for-blog-website-performance-a-guide/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 20:34:07 +0000</pubDate>
		<dc:creator>King</dc:creator>
		
		<category><![CDATA[Tricks]]></category>

		<category><![CDATA[Useful Scripts]]></category>

		<category><![CDATA[htaccess]]></category>

		<category><![CDATA[code]]></category>

		<category><![CDATA[control]]></category>

		<category><![CDATA[Security]]></category>

		<category><![CDATA[servers]]></category>

		<guid isPermaLink="false">http://www.phpmagicbook.com/?p=366</guid>
		<description><![CDATA[.htaccess file is a magic file. You can change the way your website works by using it. I have been reading a lot about .htaccess files. Perticularly .htaccess is very useful in shared web hosting environment where the users have no direct access to their servers or they want to implement some restrictions/security to their [...]]]></description>
			<content:encoded><![CDATA[<p>.htaccess file is a magic file. You can change the way your website works by using it. I have been reading a lot about .htaccess files. Perticularly .htaccess is very useful in shared web hosting environment where the users have no direct access to their servers or they want to implement some restrictions/security to their files. I will include here some very essential and useful .htaccess tricks. I have used some of these tricks and more to secure my websites according to my web server&#8217;s environment and to optimize speed/performance of my websites. Websites with heavy traffic, Digg traffic, Stumble upon or slashdot traffic will need to be optimized via many ways and .htaccess can help a lot.</p>
<p><img src="http://www.phpmagicbook.com/wp-content/uploads/2009/02/htaccess-tricks.jpg" alt="htaccess-tricks" title="htaccess-tricks" width="500" height="217" class="alignnone size-full wp-image-370" /></p>
<h4>Data Compression</h4>
<p>Use this code to compress data at web server. Data compression can minimize resources and bandwidth you consume while your website browsing.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># data compression
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript text/css application/javascript</pre></div></div>

<h4>GZip Data Compression</h4>
<p>Following is GZIP Compression code. More effective. You can specify which files to compress.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># gzip compression
&lt;IfModule mod_gzip.c&gt;
    mod_gzip_on       Yes
    mod_gzip_dechunk  Yes
    mod_gzip_item_include file      \.(html?|txt|css|js|php|pl|jpg|png|gif)$
    mod_gzip_item_include handler   ^cgi-script$
    mod_gzip_item_include mime      ^text/.*
    mod_gzip_item_include mime      ^application/x-javascript.*
    mod_gzip_item_exclude mime      ^image/.*
    mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
&lt;/IfModule&gt;</pre></div></div>

<h4>Preserve Bandwidth</h4>
<p>Preserve bandwidth using this method. This is also a compression method.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># preserve bandwidth
&lt;ifmodule mod_php4.c&gt;
 php_value zlib.output_compression 16386
&lt;/ifmodule&gt;</pre></div></div>

<h4>Cache Control</h4>
<p>Cache is very very useful. By using following code in .htaccess you can enable cache of your files. When enabling cache you will see significant increase in website load time. You will be really amazed to see heavy pages and images loading very fast.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># Begin Cache Control
&lt;IfModule mod_expires.c&gt;
ExpiresActive On
ExpiresByType application/x-javascript A2592000
ExpiresByType text/css A2592000
ExpiresByType image/gif A604800
ExpiresByType image/png A604800
ExpiresByType image/jpeg A604800
&lt;/IfModule&gt;</pre></div></div>

<h4>Secure .htaccess file</h4>
<p>Deny .htaccess file to all intruders. You can specify more files which you want to protect by seperating file names by | sign. .htaccess file can have potential information which must be secured from all outside intruders.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># secure htaccess file
&lt;Files .htaccess&gt;
 order allow,deny
 deny from all
&lt;/Files&gt;</pre></div></div>

<h4>Secure Directories</h4>
<p>By default your web server&#8217;s indexes are on. That means the directory with no index file in it will display all the files in it. Do you want the files in your wp-admin, wp-includes, images, uploads, themes, plugins folders to be seen? It is really not a good idea to show your online folder files. By using following code you will enable protection for all online directories with no index file and will not display files in them.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># No directory listing across domain
Options -Indexes</pre></div></div>

<h4>Secure Hidden Files at Server</h4>
<p>Hidden files can be server configuration files, log files and other server reserved files which should be protected from hackers as well.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># Disallow hidden files
RedirectMatch 403 /\..*$</pre></div></div>

<h4>Stop Hotlinking</h4>
<p>Some webmasters will just copy the path of images and other media from your website and use that in their own website to display your content consuming your bandwidth. This method is called as hotlinking. Protect hotlinking by using the following code. sorry.gif in the following example is the alternative file which will be displayed when someone will try and steal your content.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># stop hotlinking and serve alternate content
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourservernamehere.com/
RewriteRule \.(gif|jpg)$ http://www.yourservernamehere.com/sorry.gif [R,L]</pre></div></div>

<h4>Secure Contact Forms</h4>
<p>Secure your contact form from bots and automated softwares which will email you spam. Change &#8216;contact.php&#8217; page name to your contact page name.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># secure contact forms
RewriteCond %{HTTP_REFERER} !^http://www.yourservernamehere.com/.*$ [NC]
RewriteCond %{REQUEST_POST} .*contact.php$
RewriteRule .* - [F]</pre></div></div>

<h4>Redirect Error Pages</h4>
<p>Have you ever encountered 500 error. Internal Server error. That&#8217;s really ugly black and while page. I would suggest you to create your own custom error pages and use them wisely to make users stay at your website even some error occurs. Use the following code to redirect the users to your custom error pages in case some error occurs.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;IfModule mod_rewrite.c&gt;
RewriteEngine On
ErrorDocument 206 http://www.yourservernamehere.com/maintenance-mode.html
ErrorDocument 400 http://www.yourservernamehere.com/maintenance-mode.html
ErrorDocument 408 http://www.yourservernamehere.com/maintenance-mode.html
ErrorDocument 500 http://www.yourservernamehere.com/maintenance-mode.html
ErrorDocument 404 http://www.yourservernamehere.com/404.html
&lt;/IfModule&gt;</pre></div></div>

<h4>Disable ETags</h4>
<p>Disabling Etags will also increase website speed a bit. Removing ETags is a very safe option.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># disable etags
FileETag none</pre></div></div>

<h4>Enable Simple Mod Rewrite</h4>
<p>This is not a performance tip. This is how you enable rewriting at your server. I will write a guide about Mod Rewriting in next .htaccess post.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># enable basic rewriting
RewriteEngine on</pre></div></div>

<h4>Instruct Browser to Download Multimedia Files - Force Download</h4>
<p>If you want to tell the browser to download certain file types then use the following code.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># instruct browser to download multimedia files
AddType application/octet-stream .avi
AddType application/octet-stream .mpg
AddType application/octet-stream .wmv
AddType application/octet-stream .mp3</pre></div></div>

<p>In the end let m give you two beautiful resources about .htaccess.</p>
<h4>Best Huge Resources About .htaccess Tricks</h4>
<p><a rel="nofollow" target="_blank" href="http://perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/" target="_blank"><img src="http://www.phpmagicbook.com/wp-content/uploads/2009/02/htaccess-guide.jpg" alt="htaccess-guide" title="htaccess-guide" width="500" height="354" class="alignnone size-full wp-image-379" /></a><br />
<a rel="nofollow" target="_blank" href="http://perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/" target="_blank">PerishablePress - .htaccess Tricks (BEST)</a></p>
<h4>Online .htaccess Editor</h4>
<p>Use this .htaccess editor to select and create rules easily.<br />
<a rel="nofollow" target="_blank" href="http://www.htaccesseditor.com/en.shtml" target="_blank"><img src="http://www.phpmagicbook.com/wp-content/uploads/2009/02/htaccess-editor.jpg" alt="htaccess-editor" title="htaccess-editor" width="500" height="500" class="alignnone size-full wp-image-378" /></a></p>
<h4>More Resources</h4>
<p>Following links will lead you to more detailed resources about .htaccess file customization.<br />
<strong>.htaccess Caching Resources</strong><br />
<a rel="nofollow" target="_blank" href="http://betterexplained.com/articles/how-to-optimize-your-site-with-http-caching/" target="_blank">How to Optimize Your Site With HTTP Caching</a><br />
<a rel="nofollow" target="_blank" href="http://www.askapache.com/htaccess/speed-up-sites-with-htaccess-caching.html" target="_blank">Speed-up Sites With .htaccess Caching</a><br />
<strong>Data Compression</strong><br />
<a rel="nofollow" target="_blank" href="http://viralpatel.net/blogs/2009/02/compress-php-css-js-javascript-optimize-website-performance.html" target="_blank">Compress PHP, CSS, JS &#038; Optimize Website Performance</a><br />
<strong>More Resources</strong><br />
<a rel="nofollow" target="_blank" href="http://corz.org/serv/tricks/htaccess.php" target="_blank">corz.org .htaccess tips</a><br />
<a rel="nofollow" target="_blank" href="http://wiki.dreamhost.com/KB_/_Unix_/_.htaccess_files" target="_blank">Unix .htaccess Files</a><br />
<a rel="nofollow" target="_blank" href="http://wiki.dreamhost.com/Category:Htaccess" target="_blank">http://wiki.dreamhost.com/Category:Htaccess</a><br />
<a rel="nofollow" target="_blank" href="http://wiki.dreamhost.com/Htaccess_tricks" target="_blank">http://wiki.dreamhost.com/Htaccess_tricks</a><br />
<a rel="nofollow" target="_blank" href="http://wiki.dreamhost.com/Mod_rewrite" target="_blank">http://wiki.dreamhost.com/Mod_rewrite</a><br />
<a rel="nofollow" target="_blank" href="http://wiki.dreamhost.com/DEFLATE" target="_blank">http://wiki.dreamhost.com/DEFLATE</a><br />
<a rel="nofollow" target="_blank" href="http://wiki.dreamhost.com/More_.htaccess_mod_rewrite_examples" target="_blank">http://wiki.dreamhost.com/More_.htaccess_mod_rewrite_examples</a><br />
<a rel="nofollow" target="_blank" href="http://en.wikipedia.org/wiki/Htaccess" target="_blank">http://en.wikipedia.org/wiki/Htaccess</a></p>
<p>I am happy to share .htaccess useful tricks. I had searched much for .htaccess codes to optimize my website performance. My next target for .htaccess is Mod Rewrite. How we can Rewrite URLs. Like blogs do. They can change the URL in a friendly way and display post title rather than http://www.homepagename.com?post=some-digit</p>
<p>Allow me to give you all these codes in ready to use .htaccess file in downloadable form.<br />
Just change &#8216;yourservernamehere&#8217; in the file with your domain name and remove any part which you do not want.</p>
<p><a href='http://www.phpmagicbook.com/wp-content/uploads/2009/02/model-htaccess-file.rar' class="download">Download .htaccess File</a></p>
<p><strong>Happy Coding&#8230;<br />
Happy Valentine&#8217;s Day From PHPMagicBook</strong><br />
<h3>Related Posts</h3>
<ul class="related_post">
<li><a href="http://www.phpmagicbook.com/redirect-wordpress-rss-feeds-to-feedburner/" title="Redirect WordPress RSS Feeds to Feedburner">Redirect WordPress RSS Feeds to Feedburner</a></li>
<li><a href="http://www.phpmagicbook.com/display-total-number-of-posts-on-your-wordpress-blog/" title="Display Total Number of Posts on Your WordPress Blog">Display Total Number of Posts on Your WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/php-file-upload-script-globals-off/" title="PHP File Upload Script - Globals Off">PHP File Upload Script - Globals Off</a></li>
<li><a href="http://www.phpmagicbook.com/force-file-download-do-not-display-open-in-browser/" title="Force File download - Do Not Display Open In Browser">Force File download - Do Not Display Open In Browser</a></li>
<li><a href="http://www.phpmagicbook.com/dothtaccess-hacks/" title="DotHtaccess Hacks">DotHtaccess Hacks</a></li>
<li><a href="http://www.phpmagicbook.com/php-is-not-secure/" title="PHP is Not Secure">PHP is Not Secure</a></li>
<li><a href="http://www.phpmagicbook.com/protect-php-dot-ini-file-from-being-viewed/" title="Protect php dot ini file from being viewed">Protect php dot ini file from being viewed</a></li>
<li><a href="http://www.phpmagicbook.com/php-essential-security-fixes-for-your-website/" title="PHP Essential Security Fixes For Your Website">PHP Essential Security Fixes For Your Website</a></li>
<li><a href="http://www.phpmagicbook.com/text-to-image-using-php/" title="Text To Image Using PHP">Text To Image Using PHP</a></li>
<li><a href="http://www.phpmagicbook.com/browser-check-with-php/" title="Browser Check With PHP">Browser Check With PHP</a></li>
</ul>

	Tags: <a href="http://www.phpmagicbook.com/tag/code/" title="code" rel="tag">code</a>, <a href="http://www.phpmagicbook.com/tag/control/" title="control" rel="tag">control</a>, <a href="http://www.phpmagicbook.com/tag/htaccess/" title="htaccess" rel="tag">htaccess</a>, <a href="http://www.phpmagicbook.com/tag/security/" title="Security" rel="tag">Security</a>, <a href="http://www.phpmagicbook.com/tag/servers/" title="servers" rel="tag">servers</a><br />

<p><a href="http://feedads.g.doubleclick.net/~a/8FVRcZxpIupySlnxyqn-rwsB2w0/0/da"><img src="http://feedads.g.doubleclick.net/~a/8FVRcZxpIupySlnxyqn-rwsB2w0/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/8FVRcZxpIupySlnxyqn-rwsB2w0/1/da"><img src="http://feedads.g.doubleclick.net/~a/8FVRcZxpIupySlnxyqn-rwsB2w0/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.phpmagicbook.com/htaccess-essential-tricks-for-blog-website-performance-a-guide/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.phpmagicbook.com/htaccess-essential-tricks-for-blog-website-performance-a-guide/</feedburner:origLink></item>
		<item>
		<title>How to Include Specific File In WordPress Blog Template</title>
		<link>http://feedproxy.google.com/~r/phpmagicbook/~3/KLDZ2FEo0GI/</link>
		<comments>http://www.phpmagicbook.com/how-to-include-specific-file-in-wordpress-blog-template/#comments</comments>
		<pubDate>Sat, 29 Nov 2008 23:56:46 +0000</pubDate>
		<dc:creator>King</dc:creator>
		
		<category><![CDATA[Hacks]]></category>

		<category><![CDATA[WordPress]]></category>

		<category><![CDATA[blog]]></category>

		<category><![CDATA[customize]]></category>

		<guid isPermaLink="false">http://www.phpmagicbook.com/?p=354</guid>
		<description><![CDATA[Considering the fact that you have some file placed in your current theme folder, you can call it via following code with or without condition. If you plan to call some file right from root folder of your WordPress blog then just remove template path area of code.
With Condition

&#60;?php
if &#40; is_front_page&#40;&#41; &#41; &#123; include &#40;TEMPLATEPATH [...]]]></description>
			<content:encoded><![CDATA[<p>Considering the fact that you have some file placed in your current theme folder, you can call it via following code with or without condition. If you plan to call some file right from root folder of your WordPress blog then just remove template path area of code.</p>
<h4>With Condition</h4>

<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> is_front_page<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</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;">'/bio.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
 <span style="color: #b1b100;">else</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;">'/subscribe.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
 <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h4>Include a Specific File Without Condition</h4>

<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;">include</span> <span style="color: #009900;">&#40;</span>TEMPLATEPATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/sidebar2.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h4>Include a Specific File by URL</h4>

<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;">include</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://www.websiteurl.com/some-file.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h3>Related Posts</h3>
<ul class="related_post">
<li><a href="http://www.phpmagicbook.com/customizing-wordpress-tags-cloud-a-guide/" title="Customizing WordPress Tags Cloud - A Guide">Customizing WordPress Tags Cloud - A Guide</a></li>
<li><a href="http://www.phpmagicbook.com/how-to-display-some-content-at-homepage-single-post-of-blog/" title="How To Display Some Content at Just Home Page and Single Post of Blog">How To Display Some Content at Just Home Page and Single Post of Blog</a></li>
<li><a href="http://www.phpmagicbook.com/display-rss-feed-from-any-blog-on-your-wordpress-blog/" title="Display RSS Feed From Any Blog on Your WordPress Blog">Display RSS Feed From Any Blog on Your WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/provide-rss-feed-for-each-post-and-comment-at-your-wordpress-blog/" title="Provide RSS Feed for Each Post and Comment at Your WordPress Blog">Provide RSS Feed for Each Post and Comment at Your WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/remove-ads-for-registered-users-or-admin-on-wordpress-blog/" title="Remove Ads for Registered Users or Admin on WordPress Blog">Remove Ads for Registered Users or Admin on WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/remove-comments-section-from-your-wordpress-blog/" title="Remove Comments Section From Your WordPress Blog">Remove Comments Section From Your WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/insert-adsense-after-the-first-post-in-your-wordpress-blog/" title="Insert Adsense After the First Post in Your WordPress Blog">Insert Adsense After the First Post in Your WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/redirect-ugly-permalink-to-postname/" title="Redirect Ugly Permalink to Postname">Redirect Ugly Permalink to Postname</a></li>
<li><a href="http://www.phpmagicbook.com/optimize-blog-post-title-tag-for-seo/" title="Optimize Blog Post Title Tag For SEO">Optimize Blog Post Title Tag For SEO</a></li>
<li><a href="http://www.phpmagicbook.com/how-to-get-most-commented-posts-of-the-week-for-your-wordpress-blog/" title="How to Get Most Commented Posts of the Week for your WordPress Blog">How to Get Most Commented Posts of the Week for your WordPress Blog</a></li>
</ul>

	Tags: <a href="http://www.phpmagicbook.com/tag/blog/" title="blog" rel="tag">blog</a>, <a href="http://www.phpmagicbook.com/tag/customize/" title="customize" rel="tag">customize</a><br />

<p><a href="http://feedads.g.doubleclick.net/~a/aYCMCeQy9hwcLIQUeJzI1v3BC9g/0/da"><img src="http://feedads.g.doubleclick.net/~a/aYCMCeQy9hwcLIQUeJzI1v3BC9g/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/aYCMCeQy9hwcLIQUeJzI1v3BC9g/1/da"><img src="http://feedads.g.doubleclick.net/~a/aYCMCeQy9hwcLIQUeJzI1v3BC9g/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.phpmagicbook.com/how-to-include-specific-file-in-wordpress-blog-template/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.phpmagicbook.com/how-to-include-specific-file-in-wordpress-blog-template/</feedburner:origLink></item>
		<item>
		<title>How To Display Some Content at Just Home Page and Single Post of Blog</title>
		<link>http://feedproxy.google.com/~r/phpmagicbook/~3/Bxi26b9dMcU/</link>
		<comments>http://www.phpmagicbook.com/how-to-display-some-content-at-homepage-single-post-of-blog/#comments</comments>
		<pubDate>Sat, 29 Nov 2008 23:40:33 +0000</pubDate>
		<dc:creator>King</dc:creator>
		
		<category><![CDATA[Hacks]]></category>

		<category><![CDATA[WordPress]]></category>

		<category><![CDATA[blog]]></category>

		<category><![CDATA[customize]]></category>

		<guid isPermaLink="false">http://www.phpmagicbook.com/?p=352</guid>
		<description><![CDATA[Recently I wanted to display little about section me at my blog but just at home page and single post under sidebar. So how we can tell that we are at home page or at single post in case of WordPress Blog?
Here is the code:

&#60;?php if &#40; is_front_page&#40;&#41; or is_home&#40;&#41; or is_single&#40;&#41; &#41; &#123; ?&#62;
Your [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I wanted to display little about section me at my blog but just at home page and single post under sidebar. So how we can tell that we are at home page or at single post in case of WordPress Blog?<br />
Here is the 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> is_front_page<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> or is_home<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> or is_single<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
Your content goes here.
<span style="color: #000000; font-weight: bold;">&lt;?</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p><strong>is_front_page()</strong> and <strong>is_home()</strong> both will server same purpose.<br />
Put this code anywhere in your blog containing some content in the middle and it should display that content when just single post is viewed or home page of blog is being viewed.<br />
<h3>Related Posts</h3>
<ul class="related_post">
<li><a href="http://www.phpmagicbook.com/customizing-wordpress-tags-cloud-a-guide/" title="Customizing WordPress Tags Cloud - A Guide">Customizing WordPress Tags Cloud - A Guide</a></li>
<li><a href="http://www.phpmagicbook.com/how-to-include-specific-file-in-wordpress-blog-template/" title="How to Include Specific File In WordPress Blog Template">How to Include Specific File In WordPress Blog Template</a></li>
<li><a href="http://www.phpmagicbook.com/display-rss-feed-from-any-blog-on-your-wordpress-blog/" title="Display RSS Feed From Any Blog on Your WordPress Blog">Display RSS Feed From Any Blog on Your WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/provide-rss-feed-for-each-post-and-comment-at-your-wordpress-blog/" title="Provide RSS Feed for Each Post and Comment at Your WordPress Blog">Provide RSS Feed for Each Post and Comment at Your WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/remove-ads-for-registered-users-or-admin-on-wordpress-blog/" title="Remove Ads for Registered Users or Admin on WordPress Blog">Remove Ads for Registered Users or Admin on WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/remove-comments-section-from-your-wordpress-blog/" title="Remove Comments Section From Your WordPress Blog">Remove Comments Section From Your WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/insert-adsense-after-the-first-post-in-your-wordpress-blog/" title="Insert Adsense After the First Post in Your WordPress Blog">Insert Adsense After the First Post in Your WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/redirect-ugly-permalink-to-postname/" title="Redirect Ugly Permalink to Postname">Redirect Ugly Permalink to Postname</a></li>
<li><a href="http://www.phpmagicbook.com/optimize-blog-post-title-tag-for-seo/" title="Optimize Blog Post Title Tag For SEO">Optimize Blog Post Title Tag For SEO</a></li>
<li><a href="http://www.phpmagicbook.com/how-to-get-most-commented-posts-of-the-week-for-your-wordpress-blog/" title="How to Get Most Commented Posts of the Week for your WordPress Blog">How to Get Most Commented Posts of the Week for your WordPress Blog</a></li>
</ul>

	Tags: <a href="http://www.phpmagicbook.com/tag/blog/" title="blog" rel="tag">blog</a>, <a href="http://www.phpmagicbook.com/tag/customize/" title="customize" rel="tag">customize</a><br />

<p><a href="http://feedads.g.doubleclick.net/~a/w3E2TEJASL6v14J0qfP1Q3aTKw8/0/da"><img src="http://feedads.g.doubleclick.net/~a/w3E2TEJASL6v14J0qfP1Q3aTKw8/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/w3E2TEJASL6v14J0qfP1Q3aTKw8/1/da"><img src="http://feedads.g.doubleclick.net/~a/w3E2TEJASL6v14J0qfP1Q3aTKw8/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.phpmagicbook.com/how-to-display-some-content-at-homepage-single-post-of-blog/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.phpmagicbook.com/how-to-display-some-content-at-homepage-single-post-of-blog/</feedburner:origLink></item>
		<item>
		<title>Display RSS Feed From Any Blog on Your WordPress Blog</title>
		<link>http://feedproxy.google.com/~r/phpmagicbook/~3/XhYWUsFwq3I/</link>
		<comments>http://www.phpmagicbook.com/display-rss-feed-from-any-blog-on-your-wordpress-blog/#comments</comments>
		<pubDate>Tue, 25 Nov 2008 02:10:54 +0000</pubDate>
		<dc:creator>King</dc:creator>
		
		<category><![CDATA[Hacks]]></category>

		<category><![CDATA[WordPress]]></category>

		<category><![CDATA[blog]]></category>

		<category><![CDATA[customize]]></category>

		<guid isPermaLink="false">http://www.phpmagicbook.com/?p=341</guid>
		<description><![CDATA[Ever wanted to display any rss feed from any other blog on your WordPress blog? WordPress have a function, called wp_rss(), which is a built-in rss reader.
Add the following code where you want the rss to be displayed at your blog i.e. sidebar or footer:

&#60;?php include_once&#40;ABSPATH . WPINC . '/rss.php'&#41;;
wp_rss&#40;'http://feeds.feedburner.com/phpmagicbook', 7&#41;; 
?&#62;

We just included the [...]]]></description>
			<content:encoded><![CDATA[<p>Ever wanted to display any rss feed from any other blog on your WordPress blog? WordPress have a function, called <strong>wp_rss()</strong>, which is a built-in rss reader.</p>
<p>Add the following code where you want the rss to be displayed at your blog i.e. sidebar or footer:</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;">include_once</span><span style="color: #009900;">&#40;</span>ABSPATH <span style="color: #339933;">.</span> WPINC <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/rss.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
wp_rss<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://feeds.feedburner.com/phpmagicbook'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">7</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>We just included the <strong>rss.php</strong> file, which is a part of WordPress core.<br />
This file allows us to use the <strong>wp_rss() function</strong>.</p>
<p>wp_rss() function takes two parameters:<br />
The first is the <strong>rss feed url</strong><br />
The second is the <strong>number of rss entries</strong> to be displayed</p>
<p>How simple is that!</p>
<h3>Related Posts</h3>
<ul class="related_post">
<li><a href="http://www.phpmagicbook.com/customizing-wordpress-tags-cloud-a-guide/" title="Customizing WordPress Tags Cloud - A Guide">Customizing WordPress Tags Cloud - A Guide</a></li>
<li><a href="http://www.phpmagicbook.com/how-to-include-specific-file-in-wordpress-blog-template/" title="How to Include Specific File In WordPress Blog Template">How to Include Specific File In WordPress Blog Template</a></li>
<li><a href="http://www.phpmagicbook.com/how-to-display-some-content-at-homepage-single-post-of-blog/" title="How To Display Some Content at Just Home Page and Single Post of Blog">How To Display Some Content at Just Home Page and Single Post of Blog</a></li>
<li><a href="http://www.phpmagicbook.com/provide-rss-feed-for-each-post-and-comment-at-your-wordpress-blog/" title="Provide RSS Feed for Each Post and Comment at Your WordPress Blog">Provide RSS Feed for Each Post and Comment at Your WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/remove-ads-for-registered-users-or-admin-on-wordpress-blog/" title="Remove Ads for Registered Users or Admin on WordPress Blog">Remove Ads for Registered Users or Admin on WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/remove-comments-section-from-your-wordpress-blog/" title="Remove Comments Section From Your WordPress Blog">Remove Comments Section From Your WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/insert-adsense-after-the-first-post-in-your-wordpress-blog/" title="Insert Adsense After the First Post in Your WordPress Blog">Insert Adsense After the First Post in Your WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/redirect-ugly-permalink-to-postname/" title="Redirect Ugly Permalink to Postname">Redirect Ugly Permalink to Postname</a></li>
<li><a href="http://www.phpmagicbook.com/optimize-blog-post-title-tag-for-seo/" title="Optimize Blog Post Title Tag For SEO">Optimize Blog Post Title Tag For SEO</a></li>
<li><a href="http://www.phpmagicbook.com/how-to-get-most-commented-posts-of-the-week-for-your-wordpress-blog/" title="How to Get Most Commented Posts of the Week for your WordPress Blog">How to Get Most Commented Posts of the Week for your WordPress Blog</a></li>
</ul>

	Tags: <a href="http://www.phpmagicbook.com/tag/blog/" title="blog" rel="tag">blog</a>, <a href="http://www.phpmagicbook.com/tag/customize/" title="customize" rel="tag">customize</a><br />

<p><a href="http://feedads.g.doubleclick.net/~a/Kf_bh31E4Ihab7_3eymuLdNg8FM/0/da"><img src="http://feedads.g.doubleclick.net/~a/Kf_bh31E4Ihab7_3eymuLdNg8FM/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Kf_bh31E4Ihab7_3eymuLdNg8FM/1/da"><img src="http://feedads.g.doubleclick.net/~a/Kf_bh31E4Ihab7_3eymuLdNg8FM/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.phpmagicbook.com/display-rss-feed-from-any-blog-on-your-wordpress-blog/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.phpmagicbook.com/display-rss-feed-from-any-blog-on-your-wordpress-blog/</feedburner:origLink></item>
		<item>
		<title>Provide RSS Feed for Each Post and Comment at Your WordPress Blog</title>
		<link>http://feedproxy.google.com/~r/phpmagicbook/~3/bznVIrRy3Gs/</link>
		<comments>http://www.phpmagicbook.com/provide-rss-feed-for-each-post-and-comment-at-your-wordpress-blog/#comments</comments>
		<pubDate>Mon, 24 Nov 2008 01:48:33 +0000</pubDate>
		<dc:creator>King</dc:creator>
		
		<category><![CDATA[Hacks]]></category>

		<category><![CDATA[WordPress]]></category>

		<category><![CDATA[blog]]></category>

		<category><![CDATA[customize]]></category>

		<guid isPermaLink="false">http://www.phpmagicbook.com/?p=337</guid>
		<description><![CDATA[If a post gets lots of comment, it can be hard for your readers to stay on the conversation. WordPress blogging engine have a built-in function for providing rss feed for the comments of a specific post.
Add RSS Feed Link For Comments on Each Post
In order to provide a rss feed for the comments of [...]]]></description>
			<content:encoded><![CDATA[<p>If a post gets lots of comment, it can be hard for your readers to stay on the conversation. WordPress blogging engine have a built-in function for providing rss feed for the comments of a specific post.</p>
<p><strong>Add RSS Feed Link For Comments on Each Post</strong></p>
<p>In order to provide a rss feed for the comments of a specific post, you just have to call the <strong>comment_rss_link()</strong> function like below:</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> comments_rss_link<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Comments RSS Feed'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>You can put this code in WP LOOP to display RSS for post&#8217;s comments from each post right beneath itself.</p>
<p>Similarly we can add a rss link on each post.</p>
<p><strong>Add RSS Link on Each Post</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>?feed=rss&amp;p=<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_ID<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; target=&quot;_blank&quot;&gt;RSS 2.0&lt;/a&gt;</pre></div></div>

<p>You can put this code in WP LOOP to display RSS from each post right beneath itself.</p>
<h3>Related Posts</h3>
<ul class="related_post">
<li><a href="http://www.phpmagicbook.com/customizing-wordpress-tags-cloud-a-guide/" title="Customizing WordPress Tags Cloud - A Guide">Customizing WordPress Tags Cloud - A Guide</a></li>
<li><a href="http://www.phpmagicbook.com/how-to-include-specific-file-in-wordpress-blog-template/" title="How to Include Specific File In WordPress Blog Template">How to Include Specific File In WordPress Blog Template</a></li>
<li><a href="http://www.phpmagicbook.com/how-to-display-some-content-at-homepage-single-post-of-blog/" title="How To Display Some Content at Just Home Page and Single Post of Blog">How To Display Some Content at Just Home Page and Single Post of Blog</a></li>
<li><a href="http://www.phpmagicbook.com/display-rss-feed-from-any-blog-on-your-wordpress-blog/" title="Display RSS Feed From Any Blog on Your WordPress Blog">Display RSS Feed From Any Blog on Your WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/remove-ads-for-registered-users-or-admin-on-wordpress-blog/" title="Remove Ads for Registered Users or Admin on WordPress Blog">Remove Ads for Registered Users or Admin on WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/remove-comments-section-from-your-wordpress-blog/" title="Remove Comments Section From Your WordPress Blog">Remove Comments Section From Your WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/insert-adsense-after-the-first-post-in-your-wordpress-blog/" title="Insert Adsense After the First Post in Your WordPress Blog">Insert Adsense After the First Post in Your WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/redirect-ugly-permalink-to-postname/" title="Redirect Ugly Permalink to Postname">Redirect Ugly Permalink to Postname</a></li>
<li><a href="http://www.phpmagicbook.com/optimize-blog-post-title-tag-for-seo/" title="Optimize Blog Post Title Tag For SEO">Optimize Blog Post Title Tag For SEO</a></li>
<li><a href="http://www.phpmagicbook.com/how-to-get-most-commented-posts-of-the-week-for-your-wordpress-blog/" title="How to Get Most Commented Posts of the Week for your WordPress Blog">How to Get Most Commented Posts of the Week for your WordPress Blog</a></li>
</ul>

	Tags: <a href="http://www.phpmagicbook.com/tag/blog/" title="blog" rel="tag">blog</a>, <a href="http://www.phpmagicbook.com/tag/customize/" title="customize" rel="tag">customize</a><br />

<p><a href="http://feedads.g.doubleclick.net/~a/-Bzjy6XIYl43TdpsO6gcHZ5ARzk/0/da"><img src="http://feedads.g.doubleclick.net/~a/-Bzjy6XIYl43TdpsO6gcHZ5ARzk/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/-Bzjy6XIYl43TdpsO6gcHZ5ARzk/1/da"><img src="http://feedads.g.doubleclick.net/~a/-Bzjy6XIYl43TdpsO6gcHZ5ARzk/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.phpmagicbook.com/provide-rss-feed-for-each-post-and-comment-at-your-wordpress-blog/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.phpmagicbook.com/provide-rss-feed-for-each-post-and-comment-at-your-wordpress-blog/</feedburner:origLink></item>
		<item>
		<title>Remove Ads for Registered Users or Admin on WordPress Blog</title>
		<link>http://feedproxy.google.com/~r/phpmagicbook/~3/pZjNooaS9do/</link>
		<comments>http://www.phpmagicbook.com/remove-ads-for-registered-users-or-admin-on-wordpress-blog/#comments</comments>
		<pubDate>Sun, 23 Nov 2008 01:41:05 +0000</pubDate>
		<dc:creator>King</dc:creator>
		
		<category><![CDATA[Hacks]]></category>

		<category><![CDATA[WordPress]]></category>

		<category><![CDATA[blog]]></category>

		<category><![CDATA[customize]]></category>

		<guid isPermaLink="false">http://www.phpmagicbook.com/?p=335</guid>
		<description><![CDATA[While applying modifications online at your WordPress blog sometimes you have to re-re-refresh the blog to view quick changes. Well! you are running a blog, so you have Adsense or other Ads code too. You do not want to get banned from adevrtising companies. Right?
While you are modifying the code, so you will be logged [...]]]></description>
			<content:encoded><![CDATA[<p>While applying modifications online at your WordPress blog sometimes you have to re-re-refresh the blog to view quick changes. Well! you are running a blog, so you have Adsense or other Ads code too. You do not want to get banned from adevrtising companies. Right?</p>
<p>While you are modifying the code, so you will be logged in. We can hide the code when admin user is still in session or when he is logged in, code will not be displayed.</p>
<p>We just have to use the <strong>is_user_logged_in()</strong> function, which returns true if an user is logged in.</p>
<p>Just paste the following code anywhere on your theme where you display ads.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>is_user_logged_in<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #666666; font-style: italic;">// Insert Adsense (or whatever) code here</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<h3>Related Posts</h3>
<ul class="related_post">
<li><a href="http://www.phpmagicbook.com/customizing-wordpress-tags-cloud-a-guide/" title="Customizing WordPress Tags Cloud - A Guide">Customizing WordPress Tags Cloud - A Guide</a></li>
<li><a href="http://www.phpmagicbook.com/how-to-include-specific-file-in-wordpress-blog-template/" title="How to Include Specific File In WordPress Blog Template">How to Include Specific File In WordPress Blog Template</a></li>
<li><a href="http://www.phpmagicbook.com/how-to-display-some-content-at-homepage-single-post-of-blog/" title="How To Display Some Content at Just Home Page and Single Post of Blog">How To Display Some Content at Just Home Page and Single Post of Blog</a></li>
<li><a href="http://www.phpmagicbook.com/display-rss-feed-from-any-blog-on-your-wordpress-blog/" title="Display RSS Feed From Any Blog on Your WordPress Blog">Display RSS Feed From Any Blog on Your WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/provide-rss-feed-for-each-post-and-comment-at-your-wordpress-blog/" title="Provide RSS Feed for Each Post and Comment at Your WordPress Blog">Provide RSS Feed for Each Post and Comment at Your WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/remove-comments-section-from-your-wordpress-blog/" title="Remove Comments Section From Your WordPress Blog">Remove Comments Section From Your WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/insert-adsense-after-the-first-post-in-your-wordpress-blog/" title="Insert Adsense After the First Post in Your WordPress Blog">Insert Adsense After the First Post in Your WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/redirect-ugly-permalink-to-postname/" title="Redirect Ugly Permalink to Postname">Redirect Ugly Permalink to Postname</a></li>
<li><a href="http://www.phpmagicbook.com/optimize-blog-post-title-tag-for-seo/" title="Optimize Blog Post Title Tag For SEO">Optimize Blog Post Title Tag For SEO</a></li>
<li><a href="http://www.phpmagicbook.com/how-to-get-most-commented-posts-of-the-week-for-your-wordpress-blog/" title="How to Get Most Commented Posts of the Week for your WordPress Blog">How to Get Most Commented Posts of the Week for your WordPress Blog</a></li>
</ul>

	Tags: <a href="http://www.phpmagicbook.com/tag/blog/" title="blog" rel="tag">blog</a>, <a href="http://www.phpmagicbook.com/tag/customize/" title="customize" rel="tag">customize</a><br />

<p><a href="http://feedads.g.doubleclick.net/~a/SEkKB1JX3s5O5WFjXXxBYmjZhNE/0/da"><img src="http://feedads.g.doubleclick.net/~a/SEkKB1JX3s5O5WFjXXxBYmjZhNE/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/SEkKB1JX3s5O5WFjXXxBYmjZhNE/1/da"><img src="http://feedads.g.doubleclick.net/~a/SEkKB1JX3s5O5WFjXXxBYmjZhNE/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.phpmagicbook.com/remove-ads-for-registered-users-or-admin-on-wordpress-blog/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.phpmagicbook.com/remove-ads-for-registered-users-or-admin-on-wordpress-blog/</feedburner:origLink></item>
		<item>
		<title>Remove Comments Section From Your WordPress Blog</title>
		<link>http://feedproxy.google.com/~r/phpmagicbook/~3/wfUbyahDycE/</link>
		<comments>http://www.phpmagicbook.com/remove-comments-section-from-your-wordpress-blog/#comments</comments>
		<pubDate>Sat, 22 Nov 2008 02:05:39 +0000</pubDate>
		<dc:creator>King</dc:creator>
		
		<category><![CDATA[Hacks]]></category>

		<category><![CDATA[WordPress]]></category>

		<category><![CDATA[blog]]></category>

		<category><![CDATA[customize]]></category>

		<guid isPermaLink="false">http://www.phpmagicbook.com/?p=339</guid>
		<description><![CDATA[Comments are very important part of a blog. Some developers use WordPress as their primary CMS to build websites and sometimes client do not need comments section at all, because he needs a website and not a blog. Comments section can be removed from your blog in a very simple way.
Just edit your single.php file [...]]]></description>
			<content:encoded><![CDATA[<p>Comments are very important part of a blog. Some developers use WordPress as their primary CMS to build websites and sometimes client do not need comments section at all, because he needs a website and not a blog. Comments section can be removed from your blog in a very simple way.</p>
<p>Just edit your <strong>single.php</strong> file from your theme.</p>
<p>Find the following line:</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> comments_template<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></pre></div></div>

<p>Delete it.</p>
<h3>Related Posts</h3>
<ul class="related_post">
<li><a href="http://www.phpmagicbook.com/customizing-wordpress-tags-cloud-a-guide/" title="Customizing WordPress Tags Cloud - A Guide">Customizing WordPress Tags Cloud - A Guide</a></li>
<li><a href="http://www.phpmagicbook.com/how-to-include-specific-file-in-wordpress-blog-template/" title="How to Include Specific File In WordPress Blog Template">How to Include Specific File In WordPress Blog Template</a></li>
<li><a href="http://www.phpmagicbook.com/how-to-display-some-content-at-homepage-single-post-of-blog/" title="How To Display Some Content at Just Home Page and Single Post of Blog">How To Display Some Content at Just Home Page and Single Post of Blog</a></li>
<li><a href="http://www.phpmagicbook.com/display-rss-feed-from-any-blog-on-your-wordpress-blog/" title="Display RSS Feed From Any Blog on Your WordPress Blog">Display RSS Feed From Any Blog on Your WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/provide-rss-feed-for-each-post-and-comment-at-your-wordpress-blog/" title="Provide RSS Feed for Each Post and Comment at Your WordPress Blog">Provide RSS Feed for Each Post and Comment at Your WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/remove-ads-for-registered-users-or-admin-on-wordpress-blog/" title="Remove Ads for Registered Users or Admin on WordPress Blog">Remove Ads for Registered Users or Admin on WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/insert-adsense-after-the-first-post-in-your-wordpress-blog/" title="Insert Adsense After the First Post in Your WordPress Blog">Insert Adsense After the First Post in Your WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/redirect-ugly-permalink-to-postname/" title="Redirect Ugly Permalink to Postname">Redirect Ugly Permalink to Postname</a></li>
<li><a href="http://www.phpmagicbook.com/optimize-blog-post-title-tag-for-seo/" title="Optimize Blog Post Title Tag For SEO">Optimize Blog Post Title Tag For SEO</a></li>
<li><a href="http://www.phpmagicbook.com/how-to-get-most-commented-posts-of-the-week-for-your-wordpress-blog/" title="How to Get Most Commented Posts of the Week for your WordPress Blog">How to Get Most Commented Posts of the Week for your WordPress Blog</a></li>
</ul>

	Tags: <a href="http://www.phpmagicbook.com/tag/blog/" title="blog" rel="tag">blog</a>, <a href="http://www.phpmagicbook.com/tag/customize/" title="customize" rel="tag">customize</a><br />

<p><a href="http://feedads.g.doubleclick.net/~a/3VPPQJldX_SecSK1iLeOOp2x0Nk/0/da"><img src="http://feedads.g.doubleclick.net/~a/3VPPQJldX_SecSK1iLeOOp2x0Nk/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/3VPPQJldX_SecSK1iLeOOp2x0Nk/1/da"><img src="http://feedads.g.doubleclick.net/~a/3VPPQJldX_SecSK1iLeOOp2x0Nk/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.phpmagicbook.com/remove-comments-section-from-your-wordpress-blog/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.phpmagicbook.com/remove-comments-section-from-your-wordpress-blog/</feedburner:origLink></item>
		<item>
		<title>Insert Adsense After the First Post in Your WordPress Blog</title>
		<link>http://feedproxy.google.com/~r/phpmagicbook/~3/03Qpu7MboGo/</link>
		<comments>http://www.phpmagicbook.com/insert-adsense-after-the-first-post-in-your-wordpress-blog/#comments</comments>
		<pubDate>Sat, 22 Nov 2008 01:34:01 +0000</pubDate>
		<dc:creator>King</dc:creator>
		
		<category><![CDATA[Hacks]]></category>

		<category><![CDATA[WordPress]]></category>

		<category><![CDATA[blog]]></category>

		<category><![CDATA[customize]]></category>

		<guid isPermaLink="false">http://www.phpmagicbook.com/?p=333</guid>
		<description><![CDATA[Adsense advertisment is very popular among bloggers. Many like to display ads on their homepage. Why not after the first post? Here is a very easy way to do so by using a simple php variable as a counter.
The only thing we need is a simple php variable (here named $count) which will count how [...]]]></description>
			<content:encoded><![CDATA[<p>Adsense advertisment is very popular among bloggers. Many like to display ads on their homepage. Why not after the first post? Here is a very easy way to do so by using a simple php variable as a counter.</p>
<p>The only thing we need is a simple php variable (here named $count) which will count how many posts are listed. If we just listed the first post, we will display the Adsense code.</p>
<p>Here’s the code. Paste it on your index.php file, instead of your WP loop.</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>have_posts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$count</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span>have_posts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> the_post<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>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$count</span><span style="color: #339933;">++;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
  <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: #000088;">$count</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
          //Paste the Adsense code here
          <span style="color: #000000; font-weight: bold;">&lt;?php</span> the_excerpt<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>
   <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">else</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
          <span style="color: #000000; font-weight: bold;">&lt;?php</span> the_excerpt<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>
  <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endwhile</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h3>Related Posts</h3>
<ul class="related_post">
<li><a href="http://www.phpmagicbook.com/customizing-wordpress-tags-cloud-a-guide/" title="Customizing WordPress Tags Cloud - A Guide">Customizing WordPress Tags Cloud - A Guide</a></li>
<li><a href="http://www.phpmagicbook.com/how-to-include-specific-file-in-wordpress-blog-template/" title="How to Include Specific File In WordPress Blog Template">How to Include Specific File In WordPress Blog Template</a></li>
<li><a href="http://www.phpmagicbook.com/how-to-display-some-content-at-homepage-single-post-of-blog/" title="How To Display Some Content at Just Home Page and Single Post of Blog">How To Display Some Content at Just Home Page and Single Post of Blog</a></li>
<li><a href="http://www.phpmagicbook.com/display-rss-feed-from-any-blog-on-your-wordpress-blog/" title="Display RSS Feed From Any Blog on Your WordPress Blog">Display RSS Feed From Any Blog on Your WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/provide-rss-feed-for-each-post-and-comment-at-your-wordpress-blog/" title="Provide RSS Feed for Each Post and Comment at Your WordPress Blog">Provide RSS Feed for Each Post and Comment at Your WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/remove-ads-for-registered-users-or-admin-on-wordpress-blog/" title="Remove Ads for Registered Users or Admin on WordPress Blog">Remove Ads for Registered Users or Admin on WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/remove-comments-section-from-your-wordpress-blog/" title="Remove Comments Section From Your WordPress Blog">Remove Comments Section From Your WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/redirect-ugly-permalink-to-postname/" title="Redirect Ugly Permalink to Postname">Redirect Ugly Permalink to Postname</a></li>
<li><a href="http://www.phpmagicbook.com/optimize-blog-post-title-tag-for-seo/" title="Optimize Blog Post Title Tag For SEO">Optimize Blog Post Title Tag For SEO</a></li>
<li><a href="http://www.phpmagicbook.com/how-to-get-most-commented-posts-of-the-week-for-your-wordpress-blog/" title="How to Get Most Commented Posts of the Week for your WordPress Blog">How to Get Most Commented Posts of the Week for your WordPress Blog</a></li>
</ul>

	Tags: <a href="http://www.phpmagicbook.com/tag/blog/" title="blog" rel="tag">blog</a>, <a href="http://www.phpmagicbook.com/tag/customize/" title="customize" rel="tag">customize</a><br />

<p><a href="http://feedads.g.doubleclick.net/~a/Lf8BYdE3VGpeE1kWPbWNnupkQs4/0/da"><img src="http://feedads.g.doubleclick.net/~a/Lf8BYdE3VGpeE1kWPbWNnupkQs4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Lf8BYdE3VGpeE1kWPbWNnupkQs4/1/da"><img src="http://feedads.g.doubleclick.net/~a/Lf8BYdE3VGpeE1kWPbWNnupkQs4/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.phpmagicbook.com/insert-adsense-after-the-first-post-in-your-wordpress-blog/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.phpmagicbook.com/insert-adsense-after-the-first-post-in-your-wordpress-blog/</feedburner:origLink></item>
		<item>
		<title>Redirect Ugly Permalink to Postname</title>
		<link>http://feedproxy.google.com/~r/phpmagicbook/~3/Tn-SWOZpE1U/</link>
		<comments>http://www.phpmagicbook.com/redirect-ugly-permalink-to-postname/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 01:09:50 +0000</pubDate>
		<dc:creator>King</dc:creator>
		
		<category><![CDATA[Hacks]]></category>

		<category><![CDATA[WordPress]]></category>

		<category><![CDATA[blog]]></category>

		<category><![CDATA[customize]]></category>

		<guid isPermaLink="false">http://www.phpmagicbook.com/?p=329</guid>
		<description><![CDATA[Most of the blogs, even popular blogs have their permalink structure like:
http://www.yourblog.com/year/month/day/post-name/
WordPress Offers following permalink structures:
http://www.yourblog.com/?p=123 (Default)
http://www.yourblog.com/2008/11/10/sample-post/ (year/month/day/postname)
http://www.yourblog.com/2008/11/sample-post/ (year/month/postname)
http://www.yourblog.com/archives/123 (numeric)
and custom permalink structure
The recommended one by SEO experts is following:
http://www.yourblog.com/sample-post/
Which can be achieved by putting /%postname%/ in custom permalink box from your admin area under permalinks.

Many bloggers will not switch to recommended permalink because they [...]]]></description>
			<content:encoded><![CDATA[<p>Most of the blogs, even popular blogs have their permalink structure like:<br />
http://www.yourblog.com/year/month/day/post-name/</p>
<p>WordPress Offers following permalink structures:</p>
<p>http://www.yourblog.com/?p=123 (Default)<br />
http://www.yourblog.com/2008/11/10/sample-post/ (year/month/day/postname)<br />
http://www.yourblog.com/2008/11/sample-post/ (year/month/postname)<br />
http://www.yourblog.com/archives/123 (numeric)<br />
and custom permalink structure</p>
<p>The recommended one by SEO experts is following:<br />
http://www.yourblog.com/sample-post/<br />
Which can be achieved by putting <strong>/%postname%/</strong> in custom permalink box from your admin area under permalinks.</p>
<p><a href="http://www.phpmagicbook.com/redirect-ugly-permalink-to-postname/custom-permalink-structure/" rel="attachment wp-att-330" target="_blank"><img src="http://www.phpmagicbook.com/wp-content/uploads/2008/11/custom-permalink-structure-300x137.jpg" alt="" title="custom-permalink-structure" width="300" height="137" class="alignnone size-medium wp-image-330" /></a></p>
<p>Many bloggers will not switch to recommended permalink because they have got backlinks for their old permalink. If you are still using the ugly <strong>/%year%/%month%/%day%/%postname%/</strong> permalink structure, you should be interested to know how you can switch to the elegant <strong>/%postname%/</strong> structure without loosing any backlink, using a simple .htaccess redirection.</p>
<p>The first thing to do is to change permalink structure from your admin area.<br />
Go to Permalinks<br />
Select custom<br />
Fill out the field with <strong>/%postname%/</strong></p>
<p>http://www.yourblog.com/post-name</p>
<p>Now we have got to redirect all backlinks using the old permalinks structure to the new permalink structure. To do so, you’ll have to edit the .htaccess file, located in WordPress installation root directory.</p>
<p>Paste the following line in your .htaccess:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">RedirectMatch 301 /([0-9]+)/([0-9]+)/([0-9]+)/(.*)$ http://www.domain.com/$4</pre></div></div>

<p>Congrats! You just changed your permalinks structure without loosing any backlinks! Cheers&#8230;</p>
<h3>Related Posts</h3>
<ul class="related_post">
<li><a href="http://www.phpmagicbook.com/customizing-wordpress-tags-cloud-a-guide/" title="Customizing WordPress Tags Cloud - A Guide">Customizing WordPress Tags Cloud - A Guide</a></li>
<li><a href="http://www.phpmagicbook.com/how-to-include-specific-file-in-wordpress-blog-template/" title="How to Include Specific File In WordPress Blog Template">How to Include Specific File In WordPress Blog Template</a></li>
<li><a href="http://www.phpmagicbook.com/how-to-display-some-content-at-homepage-single-post-of-blog/" title="How To Display Some Content at Just Home Page and Single Post of Blog">How To Display Some Content at Just Home Page and Single Post of Blog</a></li>
<li><a href="http://www.phpmagicbook.com/display-rss-feed-from-any-blog-on-your-wordpress-blog/" title="Display RSS Feed From Any Blog on Your WordPress Blog">Display RSS Feed From Any Blog on Your WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/provide-rss-feed-for-each-post-and-comment-at-your-wordpress-blog/" title="Provide RSS Feed for Each Post and Comment at Your WordPress Blog">Provide RSS Feed for Each Post and Comment at Your WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/remove-ads-for-registered-users-or-admin-on-wordpress-blog/" title="Remove Ads for Registered Users or Admin on WordPress Blog">Remove Ads for Registered Users or Admin on WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/remove-comments-section-from-your-wordpress-blog/" title="Remove Comments Section From Your WordPress Blog">Remove Comments Section From Your WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/insert-adsense-after-the-first-post-in-your-wordpress-blog/" title="Insert Adsense After the First Post in Your WordPress Blog">Insert Adsense After the First Post in Your WordPress Blog</a></li>
<li><a href="http://www.phpmagicbook.com/optimize-blog-post-title-tag-for-seo/" title="Optimize Blog Post Title Tag For SEO">Optimize Blog Post Title Tag For SEO</a></li>
<li><a href="http://www.phpmagicbook.com/how-to-get-most-commented-posts-of-the-week-for-your-wordpress-blog/" title="How to Get Most Commented Posts of the Week for your WordPress Blog">How to Get Most Commented Posts of the Week for your WordPress Blog</a></li>
</ul>

	Tags: <a href="http://www.phpmagicbook.com/tag/blog/" title="blog" rel="tag">blog</a>, <a href="http://www.phpmagicbook.com/tag/customize/" title="customize" rel="tag">customize</a><br />

<p><a href="http://feedads.g.doubleclick.net/~a/Q16q3Rl-39hYgIIbiKJPBeIgGQo/0/da"><img src="http://feedads.g.doubleclick.net/~a/Q16q3Rl-39hYgIIbiKJPBeIgGQo/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Q16q3Rl-39hYgIIbiKJPBeIgGQo/1/da"><img src="http://feedads.g.doubleclick.net/~a/Q16q3Rl-39hYgIIbiKJPBeIgGQo/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.phpmagicbook.com/redirect-ugly-permalink-to-postname/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.phpmagicbook.com/redirect-ugly-permalink-to-postname/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 5.170 seconds. --><!-- Cached page generated by WP-Super-Cache on 2009-07-13 12:50:09 -->
