<?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>PHP Magic Book - Free PHP Scripts, Tutorials and Downloads &#187; Hacks</title>
	<atom:link href="http://www.phpmagicbook.com/category/wordpress/hacks/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.phpmagicbook.com</link>
	<description>PHP AtoZ Reloaded, free php tutorials, free php downloads, php scripts, PHP tips</description>
	<lastBuildDate>Tue, 15 Jun 2010 13:22:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Change Default WordPress Gravatar in Comments</title>
		<link>http://www.phpmagicbook.com/change-default-wordpress-gravatar-in-comments/</link>
		<comments>http://www.phpmagicbook.com/change-default-wordpress-gravatar-in-comments/#comments</comments>
		<pubDate>Sun, 20 Dec 2009 20:52:20 +0000</pubDate>
		<dc:creator>Hiroshi</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.phpmagicbook.com/?p=501</guid>
		<description><![CDATA[If you use a plugin to add avatars to your blog, there might be a setting in the plugin’s options page for choosing the default avatar. If you use WordPress 2.5+, then you probably use a template tag like the following for your avatars. &#60;?php echo get_avatar&#40; $comment, 32 &#41;; ?&#62; You can easily modify [...]<p><a href="http://www.phpmagicbook.com/change-default-wordpress-gravatar-in-comments/">Change Default WordPress Gravatar in Comments</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
]]></description>
			<content:encoded><![CDATA[<p>If you use a plugin to add avatars to your blog, there might be a setting in the plugin’s options page for choosing the default avatar. If you use WordPress 2.5+, then you probably use a template tag like the following for your avatars.</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;">echo</span> get_avatar<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$comment</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">32</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 easily modify this code to show a default customized gravatar to appear if the comment author has no gravater to show.</p>
<p><span id="more-501"></span></p>
<p>Just add a comma after the 32 (The pixel size of the image, if you want to change that while you’re at it!), and paste in the URL to your image. e.g.</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;">echo</span> get_avatar<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$comment</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">80</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'http://www.yourblogaddress.com/my-gravatar.jpg'</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>Now the comments on your posts will have a much nicer image that draws less attention, promotes recognition of your logo, and as so few blogs have a unique default avatar, it shows your attention to detail.</p>
<p><a href="http://www.phpmagicbook.com/change-default-wordpress-gravatar-in-comments/">Change Default WordPress Gravatar in Comments</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.phpmagicbook.com/display-images-from-folder/" title="Auto Display Images From Folder Using PHP">Auto Display Images From Folder Using PHP</a></li><li><a href="http://www.phpmagicbook.com/include-require-functions/" title="Include VS Require Functions in PHP">Include VS Require Functions in PHP</a></li><li><a href="http://www.phpmagicbook.com/using-external-javascript-files/" title="Using External Javascript Files">Using External Javascript Files</a></li><li><a href="http://www.phpmagicbook.com/windows-time-zones-list/" title="Windows Time Zones List">Windows Time Zones List</a></li><li><a href="http://www.phpmagicbook.com/php-file-read/" title="PHP &#8211; File Read">PHP &#8211; File Read</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><li><a href="http://www.phpmagicbook.com/php-file-upload-script-globals-off/" title="PHP File Upload Script &#8211; Globals Off">PHP File Upload Script &#8211; Globals Off</a></li><li><a href="http://www.phpmagicbook.com/confirm-form-variables-post-before-script-execution/" title="Confirm Form Variables Post Before Script Execution">Confirm Form Variables Post Before Script Execution</a></li><li><a href="http://www.phpmagicbook.com/php-creating-a-file/" title="Creating A File Using PHP">Creating A File Using PHP</a></li><li><a href="http://www.phpmagicbook.com/multiple-sections-of-single-page-dynamically-called-pages/" title="Multiple Sections Of Single Page, Dynamic Sections Of Pages">Multiple Sections Of Single Page, Dynamic Sections Of Pages</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.phpmagicbook.com/change-default-wordpress-gravatar-in-comments/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hide WordPress WP-Admin Login Page</title>
		<link>http://www.phpmagicbook.com/hide-wordpress-wp-admin-login-page/</link>
		<comments>http://www.phpmagicbook.com/hide-wordpress-wp-admin-login-page/#comments</comments>
		<pubDate>Sun, 20 Dec 2009 20:20:05 +0000</pubDate>
		<dc:creator>Hiroshi</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.phpmagicbook.com/?p=502</guid>
		<description><![CDATA[Here is a code which you can use to hide your wp-admin screen. Change YOURSECRETWORDHERE to something else. It can be any word you want. Just make sure it&#8217;s unique and somewhat long. Make it, like, your pets name or something random. Change ADMINFOLDER to the new folder name you want. Letters, numbers, underscores, and [...]<p><a href="http://www.phpmagicbook.com/hide-wordpress-wp-admin-login-page/">Hide WordPress WP-Admin Login Page</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Here is a code which you can use to hide your wp-admin screen. Change YOURSECRETWORDHERE to something else. It can be any word you want. Just make sure it&#8217;s unique and somewhat long. Make it, like, your pets name or something random. Change ADMINFOLDER to the new folder name you want. Letters, numbers, underscores, and dashes only. That ^ in front of it is on purpose. Don&#8217;t delete that. Back up your original .htaccess file before making any changes. I am not responsible for any mess up.</p>
<p><span id="more-502"></span></p>
<p><4>.htaccess Code</h4>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">RewriteEngine On
RewriteBase / 
##### ABOVE THIS POINT IS ALREADY INSERTED BY WORD PRESS
##### Michi’s code is BELOW #####
RewriteCond %{REQUEST_URI} wp-admin/
RewriteCond %{QUERY_STRING} !YOURSECRETWORDHERE
RewriteRule .*.php [F,L]
RewriteCond %{QUERY_STRING} !YOURSECRETWORDHERE
RewriteRule ^ADMINFOLDER/(.*) wp-admin/$1?%{QUERY_STRING}&amp;YOURSECRETWORDHERE [L]
##### Michi’s code is ABOVE #####
##### BELOW THIS POINT IS ALREADY INSERTED BY WORD PRESS
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]</pre></div></div>

<p><a href="http://www.phpmagicbook.com/hide-wordpress-wp-admin-login-page/">Hide WordPress WP-Admin Login Page</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.phpmagicbook.com/print/" title="Print in PHP">Print in PHP</a></li><li><a href="http://www.phpmagicbook.com/captcha-image-number-verification/" title="Captcha &#8211; Image And Number Verification Using PHP">Captcha &#8211; Image And Number Verification Using PHP</a></li><li><a href="http://www.phpmagicbook.com/customizing-wordpress-tags-cloud-a-guide/" title="Customizing WordPress Tags Cloud &#8211; A Guide">Customizing WordPress Tags Cloud &#8211; A Guide</a></li><li><a href="http://www.phpmagicbook.com/find-path-of-file-at-server-using-php/" title="Find Path Of File At Server Using PHP">Find Path Of File At Server Using PHP</a></li><li><a href="http://www.phpmagicbook.com/daily-changing-content-or-link-throughout-month/" title="Daily Changing Content Or Link Throughout Month">Daily Changing Content Or Link Throughout Month</a></li><li><a href="http://www.phpmagicbook.com/easiest-way-ever-php-email/" title="Easiest Way Ever PHP eMail Script">Easiest Way Ever PHP eMail Script</a></li><li><a href="http://www.phpmagicbook.com/php-script-not-working-solution/" title="PHP Script Not Working &#8211; Solution">PHP Script Not Working &#8211; Solution</a></li><li><a href="http://www.phpmagicbook.com/php-string-case-capitalization/" title="PHP &#8211; String Case &#8211; Capitalization">PHP &#8211; String Case &#8211; Capitalization</a></li><li><a href="http://www.phpmagicbook.com/simple-text-based-hit-counter-for-static-html-pages/" title="Simple Text Based Hit Counter For Static HTML Pages">Simple Text Based Hit Counter For Static HTML Pages</a></li><li><a href="http://www.phpmagicbook.com/define-variable-in-php/" title="Define Variable In PHP">Define Variable In PHP</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.phpmagicbook.com/hide-wordpress-wp-admin-login-page/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Customizing WordPress Tags Cloud &#8211; A Guide</title>
		<link>http://www.phpmagicbook.com/customizing-wordpress-tags-cloud-a-guide/</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>Hiroshi</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 [...]<p><a href="http://www.phpmagicbook.com/customizing-wordpress-tags-cloud-a-guide/">Customizing WordPress Tags Cloud &#8211; A Guide</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
]]></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 &#8211; 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?</p>
<p><a href="http://www.phpmagicbook.com/customizing-wordpress-tags-cloud-a-guide/">Customizing WordPress Tags Cloud &#8211; A Guide</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.phpmagicbook.com/change-blog-forum-theme-color-scheme-online-live-tool/" title="Change Your Blog or Forum Theme Color Scheme Online Live">Change Your Blog or Forum Theme Color Scheme Online Live</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/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></ul>]]></content:encoded>
			<wfw:commentRss>http://www.phpmagicbook.com/customizing-wordpress-tags-cloud-a-guide/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>How to Include Specific File In WordPress Blog Template</title>
		<link>http://www.phpmagicbook.com/how-to-include-specific-file-in-wordpress-blog-template/</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>Hiroshi</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; [...]<p><a href="http://www.phpmagicbook.com/how-to-include-specific-file-in-wordpress-blog-template/">How to Include Specific File In WordPress Blog Template</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
]]></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>
<p><span id="more-354"></span></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>

<p><a href="http://www.phpmagicbook.com/how-to-include-specific-file-in-wordpress-blog-template/">How to Include Specific File In WordPress Blog Template</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.phpmagicbook.com/change-blog-forum-theme-color-scheme-online-live-tool/" title="Change Your Blog or Forum Theme Color Scheme Online Live">Change Your Blog or Forum Theme Color Scheme Online Live</a></li><li><a href="http://www.phpmagicbook.com/customizing-wordpress-tags-cloud-a-guide/" title="Customizing WordPress Tags Cloud &#8211; A Guide">Customizing WordPress Tags Cloud &#8211; 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></ul>]]></content:encoded>
			<wfw:commentRss>http://www.phpmagicbook.com/how-to-include-specific-file-in-wordpress-blog-template/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Display Some Content at Just Home Page and Single Post of Blog</title>
		<link>http://www.phpmagicbook.com/how-to-display-some-content-at-homepage-single-post-of-blog/</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>Hiroshi</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; [...]<p><a href="http://www.phpmagicbook.com/how-to-display-some-content-at-homepage-single-post-of-blog/">How To Display Some Content at Just Home Page and Single Post of Blog</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
]]></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? Here is the code:</p>
<p><span id="more-352"></span></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.</p>
<p><a href="http://www.phpmagicbook.com/how-to-display-some-content-at-homepage-single-post-of-blog/">How To Display Some Content at Just Home Page and Single Post of Blog</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.phpmagicbook.com/change-blog-forum-theme-color-scheme-online-live-tool/" title="Change Your Blog or Forum Theme Color Scheme Online Live">Change Your Blog or Forum Theme Color Scheme Online Live</a></li><li><a href="http://www.phpmagicbook.com/customizing-wordpress-tags-cloud-a-guide/" title="Customizing WordPress Tags Cloud &#8211; A Guide">Customizing WordPress Tags Cloud &#8211; 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></ul>]]></content:encoded>
			<wfw:commentRss>http://www.phpmagicbook.com/how-to-display-some-content-at-homepage-single-post-of-blog/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Display RSS Feed From Any Blog on Your WordPress Blog</title>
		<link>http://www.phpmagicbook.com/display-rss-feed-from-any-blog-on-your-wordpress-blog/</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>Hiroshi</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; [...]<p><a href="http://www.phpmagicbook.com/display-rss-feed-from-any-blog-on-your-wordpress-blog/">Display RSS Feed From Any Blog on Your WordPress Blog</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
]]></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>
<p><span id="more-341"></span></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>
<p><a href="http://www.phpmagicbook.com/display-rss-feed-from-any-blog-on-your-wordpress-blog/">Display RSS Feed From Any Blog on Your WordPress Blog</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.phpmagicbook.com/change-blog-forum-theme-color-scheme-online-live-tool/" title="Change Your Blog or Forum Theme Color Scheme Online Live">Change Your Blog or Forum Theme Color Scheme Online Live</a></li><li><a href="http://www.phpmagicbook.com/customizing-wordpress-tags-cloud-a-guide/" title="Customizing WordPress Tags Cloud &#8211; A Guide">Customizing WordPress Tags Cloud &#8211; 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></ul>]]></content:encoded>
			<wfw:commentRss>http://www.phpmagicbook.com/display-rss-feed-from-any-blog-on-your-wordpress-blog/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Provide RSS Feed for Each Post and Comment at Your WordPress Blog</title>
		<link>http://www.phpmagicbook.com/provide-rss-feed-for-each-post-and-comment-at-your-wordpress-blog/</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>Hiroshi</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 [...]<p><a href="http://www.phpmagicbook.com/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> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
]]></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>
<p><span id="more-337"></span></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>
<p><a href="http://www.phpmagicbook.com/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> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.phpmagicbook.com/change-blog-forum-theme-color-scheme-online-live-tool/" title="Change Your Blog or Forum Theme Color Scheme Online Live">Change Your Blog or Forum Theme Color Scheme Online Live</a></li><li><a href="http://www.phpmagicbook.com/customizing-wordpress-tags-cloud-a-guide/" title="Customizing WordPress Tags Cloud &#8211; A Guide">Customizing WordPress Tags Cloud &#8211; 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></ul>]]></content:encoded>
			<wfw:commentRss>http://www.phpmagicbook.com/provide-rss-feed-for-each-post-and-comment-at-your-wordpress-blog/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Remove Ads for Registered Users or Admin on WordPress Blog</title>
		<link>http://www.phpmagicbook.com/remove-ads-for-registered-users-or-admin-on-wordpress-blog/</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>Hiroshi</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 [...]<p><a href="http://www.phpmagicbook.com/remove-ads-for-registered-users-or-admin-on-wordpress-blog/">Remove Ads for Registered Users or Admin on WordPress Blog</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
]]></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><span id="more-335"></span></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>

<p><a href="http://www.phpmagicbook.com/remove-ads-for-registered-users-or-admin-on-wordpress-blog/">Remove Ads for Registered Users or Admin on WordPress Blog</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.phpmagicbook.com/change-blog-forum-theme-color-scheme-online-live-tool/" title="Change Your Blog or Forum Theme Color Scheme Online Live">Change Your Blog or Forum Theme Color Scheme Online Live</a></li><li><a href="http://www.phpmagicbook.com/customizing-wordpress-tags-cloud-a-guide/" title="Customizing WordPress Tags Cloud &#8211; A Guide">Customizing WordPress Tags Cloud &#8211; 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></ul>]]></content:encoded>
			<wfw:commentRss>http://www.phpmagicbook.com/remove-ads-for-registered-users-or-admin-on-wordpress-blog/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Remove Comments Section From Your WordPress Blog</title>
		<link>http://www.phpmagicbook.com/remove-comments-section-from-your-wordpress-blog/</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>Hiroshi</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 [...]<p><a href="http://www.phpmagicbook.com/remove-comments-section-from-your-wordpress-blog/">Remove Comments Section From Your WordPress Blog</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
]]></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><span id="more-339"></span></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>
<p><a href="http://www.phpmagicbook.com/remove-comments-section-from-your-wordpress-blog/">Remove Comments Section From Your WordPress Blog</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.phpmagicbook.com/change-blog-forum-theme-color-scheme-online-live-tool/" title="Change Your Blog or Forum Theme Color Scheme Online Live">Change Your Blog or Forum Theme Color Scheme Online Live</a></li><li><a href="http://www.phpmagicbook.com/customizing-wordpress-tags-cloud-a-guide/" title="Customizing WordPress Tags Cloud &#8211; A Guide">Customizing WordPress Tags Cloud &#8211; 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></ul>]]></content:encoded>
			<wfw:commentRss>http://www.phpmagicbook.com/remove-comments-section-from-your-wordpress-blog/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Insert Adsense After the First Post in Your WordPress Blog</title>
		<link>http://www.phpmagicbook.com/insert-adsense-after-the-first-post-in-your-wordpress-blog/</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>Hiroshi</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 [...]<p><a href="http://www.phpmagicbook.com/insert-adsense-after-the-first-post-in-your-wordpress-blog/">Insert Adsense After the First Post in Your WordPress Blog</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
]]></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>
<p><span id="more-333"></span></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>

<p><a href="http://www.phpmagicbook.com/insert-adsense-after-the-first-post-in-your-wordpress-blog/">Insert Adsense After the First Post in Your WordPress Blog</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.phpmagicbook.com/change-blog-forum-theme-color-scheme-online-live-tool/" title="Change Your Blog or Forum Theme Color Scheme Online Live">Change Your Blog or Forum Theme Color Scheme Online Live</a></li><li><a href="http://www.phpmagicbook.com/customizing-wordpress-tags-cloud-a-guide/" title="Customizing WordPress Tags Cloud &#8211; A Guide">Customizing WordPress Tags Cloud &#8211; 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></ul>]]></content:encoded>
			<wfw:commentRss>http://www.phpmagicbook.com/insert-adsense-after-the-first-post-in-your-wordpress-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 4.254 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-07-30 16:34:16 -->
