<?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>WpFunc &#187; blog</title>
	<atom:link href="http://www.wpfunc.com/tag/blog/feed" rel="self" type="application/rss+xml" />
	<link>http://www.wpfunc.com</link>
	<description>Awesome, Quick, Simple WordPress Functions!</description>
	<lastBuildDate>Fri, 09 Jul 2010 09:05:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Some Plugins can break your blog, but you can change it!</title>
		<link>http://www.wpfunc.com/wordpress/some-plugins-can-break-your-blog-but-you-can-change-it.html</link>
		<comments>http://www.wpfunc.com/wordpress/some-plugins-can-break-your-blog-but-you-can-change-it.html#comments</comments>
		<pubDate>Tue, 22 Sep 2009 00:46:00 +0000</pubDate>
		<dc:creator>KaiseRCrazY</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[function_exists]]></category>
		<category><![CDATA[if]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[system]]></category>

		<guid isPermaLink="false">http://www.wpfunc.com/?p=194</guid>
		<description><![CDATA[Some plugins break your blog when you deactivate! This reason some plugins don&#8217;t have an &#8216;if&#8217; function with this short codes. This can break your blog. You can change it very simple. We will use if and function_exists tags when we call the plugin ord function. With this simple tags help us to work clean.
I will [...]<hr /><div style="text-align:center;">
<a href="http://aweber.com/?339698" title="Email Marketing">
<img src="http://www.aweber.com/banners/email_marketing/468x60_an.gif" alt="Email Marketing $19/Month!" style="border:none;" /></a>
</div><hr />


Related posts:<ol><li><a href='http://www.wpfunc.com/general/related-posts-without-any-plugin.html' rel='bookmark' title='Permanent Link: Related Posts, Without any Plugin!'>Related Posts, Without any Plugin!</a></li>
<li><a href='http://www.wpfunc.com/wordpress/related-posts-with-thumbnails.html' rel='bookmark' title='Permanent Link: Related Posts With Thumbnails'>Related Posts With Thumbnails</a></li>
<li><a href='http://www.wpfunc.com/collections/7-plugins-you-should-use.html' rel='bookmark' title='Permanent Link: 7 plugins you should use'>7 plugins you should use</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Some plugins break your blog when you deactivate! This reason some plugins don&#8217;t have an &#8216;if&#8217; function with this short codes. This can break your blog. You can change it very simple. We will use<strong> <span style="color: #ff0000;">if</span></strong> and <span style="color: #ff0000;"><strong>function_exists</strong></span> tags when we call the plugin ord function. With this simple tags help us to work clean.<span id="more-194"></span></p>
<p style="text-align: justify;">I will give to you a simple trick. I will use a example for explain that. Look at this code below. I Will use Related Post Plugin&#8217;s code.</p>
<p>Example:</p>
<pre class="brush: plain;">&lt;?php related_posts(); ?&gt;</pre>
<p>With <strong>if</strong> and <strong>function_exists</strong>:</p>
<pre class="brush: plain;">&lt;?php if(function_exists('related_posts')) { related_posts(); } ?&gt;</pre>
<p style="text-align: justify;">We use <strong>related_posts</strong> twice. But with this code the plugin don&#8217;t make any problems after deactivating. You can apply this code all plugins  which one have a short code like Related Post Plugin.</p>
<a rel='nofollow' target='_blank'  href='http://delicious.com/post?url=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fsome-plugins-can-break-your-blog-but-you-can-change-it.html&amp;title=Some%20Plugins%20can%20break%20your%20blog%2C%20but%20you%20can%20change%20it%21&amp;notes=Some%20plugins%20break%20your%20blog%20when%20you%20deactivate%21%20This%20reason%20some%20plugins%20don%27t%20have%20an%20%27if%27%20function%20with%20this%20short%20codes.%20This%20can%20break%20your%20blog.%20You%20can%20change%20it%20very%20simple.%20We%20will%20use%20if%20and%20function_exists%C2%A0tags%20when%20we%20call%20the%20plugin%20or'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/delicious.png' class='sociable-img sociable-hovers ' title='del.icio.us' alt='del.icio.us' /></a><a rel='nofollow' target='_blank'  href='http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fsome-plugins-can-break-your-blog-but-you-can-change-it.html&amp;title=Some%20Plugins%20can%20break%20your%20blog%2C%20but%20you%20can%20change%20it%21&amp;bodytext=Some%20plugins%20break%20your%20blog%20when%20you%20deactivate%21%20This%20reason%20some%20plugins%20don%27t%20have%20an%20%27if%27%20function%20with%20this%20short%20codes.%20This%20can%20break%20your%20blog.%20You%20can%20change%20it%20very%20simple.%20We%20will%20use%20if%20and%20function_exists%C2%A0tags%20when%20we%20call%20the%20plugin%20or'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/digg.png' class='sociable-img sociable-hovers ' title='Digg' alt='Digg' /></a><a rel='nofollow' target='_blank'  href='http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fsome-plugins-can-break-your-blog-but-you-can-change-it.html&amp;t=Some%20Plugins%20can%20break%20your%20blog%2C%20but%20you%20can%20change%20it%21'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/facebook.png' class='sociable-img sociable-hovers ' title='Facebook' alt='Facebook' /></a><a rel='nofollow' target='_blank'  href='http://www.friendfeed.com/share?title=Some%20Plugins%20can%20break%20your%20blog%2C%20but%20you%20can%20change%20it%21&amp;link=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fsome-plugins-can-break-your-blog-but-you-can-change-it.html'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/friendfeed.png' class='sociable-img sociable-hovers ' title='FriendFeed' alt='FriendFeed' /></a><a rel='nofollow' target='_blank'  href='http://reddit.com/submit?url=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fsome-plugins-can-break-your-blog-but-you-can-change-it.html&amp;title=Some%20Plugins%20can%20break%20your%20blog%2C%20but%20you%20can%20change%20it%21'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/reddit.png' class='sociable-img sociable-hovers ' title='Reddit' alt='Reddit' /></a><a rel='nofollow' target='_blank'  href='http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fsome-plugins-can-break-your-blog-but-you-can-change-it.html&amp;title=Some%20Plugins%20can%20break%20your%20blog%2C%20but%20you%20can%20change%20it%21'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/stumbleupon.png' class='sociable-img sociable-hovers ' title='StumbleUpon' alt='StumbleUpon' /></a><a rel='nofollow' target='_blank'  href='http://technorati.com/faves?add=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fsome-plugins-can-break-your-blog-but-you-can-change-it.html'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/technorati.png' class='sociable-img sociable-hovers ' title='Technorati' alt='Technorati' /></a><a rel='nofollow' target='_blank'  href='http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fsome-plugins-can-break-your-blog-but-you-can-change-it.html&amp;partner=sociable'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/pdf.png' class='sociable-img sociable-hovers ' title='PDF' alt='PDF' /></a><a rel='nofollow' target='_blank'  href='http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fsome-plugins-can-break-your-blog-but-you-can-change-it.html&amp;partner=sociable'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/printfriendly.png' class='sociable-img sociable-hovers ' title='Print' alt='Print' /></a><br/><br/>

<p>Related posts:<ol><li><a href='http://www.wpfunc.com/general/related-posts-without-any-plugin.html' rel='bookmark' title='Permanent Link: Related Posts, Without any Plugin!'>Related Posts, Without any Plugin!</a></li>
<li><a href='http://www.wpfunc.com/wordpress/related-posts-with-thumbnails.html' rel='bookmark' title='Permanent Link: Related Posts With Thumbnails'>Related Posts With Thumbnails</a></li>
<li><a href='http://www.wpfunc.com/collections/7-plugins-you-should-use.html' rel='bookmark' title='Permanent Link: 7 plugins you should use'>7 plugins you should use</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.wpfunc.com/wordpress/some-plugins-can-break-your-blog-but-you-can-change-it.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use Two or More Single.php</title>
		<link>http://www.wpfunc.com/wordpress/use-two-or-more-single-php.html</link>
		<comments>http://www.wpfunc.com/wordpress/use-two-or-more-single-php.html#comments</comments>
		<pubDate>Thu, 16 Jul 2009 23:32:55 +0000</pubDate>
		<dc:creator>KaiseRCrazY</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[categories]]></category>
		<category><![CDATA[core file]]></category>
		<category><![CDATA[else]]></category>
		<category><![CDATA[Functions]]></category>
		<category><![CDATA[if]]></category>
		<category><![CDATA[single.php]]></category>
		<category><![CDATA[vectorss]]></category>

		<guid isPermaLink="false">http://www.wpfunc.com/?p=19</guid>
		<description><![CDATA[In WordPress, we can use only one single.php. But sometimes we need different single pages for different categories. Also my friend Hakan needs 2 different single.php for his site. We build a blog page for his Vectorss site but we had a problem with ads and published pictures. We have to change this single pages. [...]<hr /><div style="text-align:center;">
<a href="http://aweber.com/?339698" title="Email Marketing">
<img src="http://www.aweber.com/banners/email_marketing/468x60_an.gif" alt="Email Marketing $19/Month!" style="border:none;" /></a>
</div><hr />


Related posts:<ol><li><a href='http://www.wpfunc.com/wordpress/udegbunam-asked-how-i-hide-my-content-from-ie6-users.html' rel='bookmark' title='Permanent Link: Udegbunam Asked &#8220;How i hide my content from IE6 Users?&#8221;'>Udegbunam Asked &#8220;How i hide my content from IE6 Users?&#8221;</a></li>
<li><a href='http://www.wpfunc.com/wordpress/did-you-bored-with-widgetized-pages.html' rel='bookmark' title='Permanent Link: Did you Bored with Widgetized Pages?'>Did you Bored with Widgetized Pages?</a></li>
<li><a href='http://www.wpfunc.com/wordpress/create-a-shortcode-for-displaying-the-loop.html' rel='bookmark' title='Permanent Link: Create a shortcode for displaying the Loop'>Create a shortcode for displaying the Loop</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">In WordPress, we can use only one single.php. But sometimes we need different single pages for different categories. Also my friend Hakan needs 2 different single.php for his site. We build a blog page for his <a href="http://www.vectorss.com" target="_blank">Vectorss</a> site but we had a problem with ads and published pictures. We have to change this single pages. After this problem, i was search and found a litte information about this problem. In this information there is a sentence like this &#8220;<em>You can solve this problem with if and else</em>&#8220;. I think about this  and i write some function. It&#8217;s Worked!<span id="more-19"></span><span class="attention"><strong>With this function/recipe you will change your core single.php file. If you have no information about WordPress coding -so you&#8217;re a newbie- you can get some support if you send a mail to me. Don&#8217;t touch your single.php if you don&#8217;t know about WordPress</strong></span></p>
<h3 style="text-align: justify;">Yep, lets start!</h3>
<p style="text-align: justify;">We cnahge our core single.php also you have to make a back-up this file. And you have to make 2 copy of this core file,  and <em><strong>single-blog.php</strong><strong>single-default.php</strong></em> (<em>single-default is a copy of our core file</em>). And upload these 2 files to your host (in template folder). After that, open your single.php on your server (with a ftp program ex: CuteFtp) and clean all code in this file and add this codes to single.php ;</p>
<pre class="brush: plain;">
&lt;?php
$post = $wp_query-&gt;post;
if ( in_category('3') ) {
 include(TEMPLATEPATH . '/single-blog.php'); }
 else { include(TEMPLATEPATH . '/single-default.php');
}
?&gt;</pre>
<p style="text-align: justify;">We make a duplicate with this code. But we give a special command to this code. With If, we said to code &#8220;<em>if we click a post in category 3 you have to call single-blog.php to us</em>&#8220;. If we get a normal category post, our core single.php call single-default.php to us. After this code our core single.php will be a tunnel page for us.</p>
<p style="text-align: justify;">And if you wanna make more single pages for your different categories you can duplicate this code.</p>
<h3>Here is the second code:</h3>
<pre class="brush: plain;">&lt;?php
$post = $wp_query-&gt;post;
if ( in_category('3') ) {
include(TEMPLATEPATH . '/single-blog.php'); }
elseif ( in_category('15') ) {
include(TEMPLATEPATH . '/single-foto.php'); }
elseif ( in_category('18') ) {
include(TEMPLATEPATH . '/single-video.php'); }
else { include(TEMPLATEPATH . '/single-default.php');
}
?&gt;</pre>
<p>Have a nice day!</p>
<a rel='nofollow' target='_blank'  href='http://delicious.com/post?url=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fuse-two-or-more-single-php.html&amp;title=Use%20Two%20or%20More%20Single.php&amp;notes=In%20WordPress%2C%20we%20can%20use%20only%20one%20single.php.%20But%20sometimes%20we%20need%20different%20single%20pages%20for%20different%20categories.%20Also%20my%20friend%20Hakan%20needs%202%20different%20single.php%20for%20his%20site.%20We%20build%20a%20blog%20page%20for%20his%20Vectorss%20site%20but%20we%20had%20a%20problem%20with%20'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/delicious.png' class='sociable-img sociable-hovers ' title='del.icio.us' alt='del.icio.us' /></a><a rel='nofollow' target='_blank'  href='http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fuse-two-or-more-single-php.html&amp;title=Use%20Two%20or%20More%20Single.php&amp;bodytext=In%20WordPress%2C%20we%20can%20use%20only%20one%20single.php.%20But%20sometimes%20we%20need%20different%20single%20pages%20for%20different%20categories.%20Also%20my%20friend%20Hakan%20needs%202%20different%20single.php%20for%20his%20site.%20We%20build%20a%20blog%20page%20for%20his%20Vectorss%20site%20but%20we%20had%20a%20problem%20with%20'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/digg.png' class='sociable-img sociable-hovers ' title='Digg' alt='Digg' /></a><a rel='nofollow' target='_blank'  href='http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fuse-two-or-more-single-php.html&amp;t=Use%20Two%20or%20More%20Single.php'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/facebook.png' class='sociable-img sociable-hovers ' title='Facebook' alt='Facebook' /></a><a rel='nofollow' target='_blank'  href='http://www.friendfeed.com/share?title=Use%20Two%20or%20More%20Single.php&amp;link=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fuse-two-or-more-single-php.html'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/friendfeed.png' class='sociable-img sociable-hovers ' title='FriendFeed' alt='FriendFeed' /></a><a rel='nofollow' target='_blank'  href='http://reddit.com/submit?url=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fuse-two-or-more-single-php.html&amp;title=Use%20Two%20or%20More%20Single.php'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/reddit.png' class='sociable-img sociable-hovers ' title='Reddit' alt='Reddit' /></a><a rel='nofollow' target='_blank'  href='http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fuse-two-or-more-single-php.html&amp;title=Use%20Two%20or%20More%20Single.php'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/stumbleupon.png' class='sociable-img sociable-hovers ' title='StumbleUpon' alt='StumbleUpon' /></a><a rel='nofollow' target='_blank'  href='http://technorati.com/faves?add=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fuse-two-or-more-single-php.html'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/technorati.png' class='sociable-img sociable-hovers ' title='Technorati' alt='Technorati' /></a><a rel='nofollow' target='_blank'  href='http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fuse-two-or-more-single-php.html&amp;partner=sociable'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/pdf.png' class='sociable-img sociable-hovers ' title='PDF' alt='PDF' /></a><a rel='nofollow' target='_blank'  href='http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fuse-two-or-more-single-php.html&amp;partner=sociable'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/printfriendly.png' class='sociable-img sociable-hovers ' title='Print' alt='Print' /></a><br/><br/>

<p>Related posts:<ol><li><a href='http://www.wpfunc.com/wordpress/udegbunam-asked-how-i-hide-my-content-from-ie6-users.html' rel='bookmark' title='Permanent Link: Udegbunam Asked &#8220;How i hide my content from IE6 Users?&#8221;'>Udegbunam Asked &#8220;How i hide my content from IE6 Users?&#8221;</a></li>
<li><a href='http://www.wpfunc.com/wordpress/did-you-bored-with-widgetized-pages.html' rel='bookmark' title='Permanent Link: Did you Bored with Widgetized Pages?'>Did you Bored with Widgetized Pages?</a></li>
<li><a href='http://www.wpfunc.com/wordpress/create-a-shortcode-for-displaying-the-loop.html' rel='bookmark' title='Permanent Link: Create a shortcode for displaying the Loop'>Create a shortcode for displaying the Loop</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.wpfunc.com/wordpress/use-two-or-more-single-php.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
