<?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>WPBeginner &#187; wordpress tutorial</title>
	<atom:link href="http://www.wpbeginner.com/tag/wordpress-tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wpbeginner.com</link>
	<description>Beginner&#039;s Guide for WordPress</description>
	<lastBuildDate>Fri, 24 May 2013 12:00:06 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<atom:link rel='hub' href='http://www.wpbeginner.com/?pushpress=hub'/>
		<item>
		<title>How to Add Content and Completely Manipulate Your WordPress RSS Feeds</title>
		<link>http://www.wpbeginner.com/wp-tutorials/how-to-add-content-and-completely-manipulate-your-wordpress-rss-feeds/</link>
		<comments>http://www.wpbeginner.com/wp-tutorials/how-to-add-content-and-completely-manipulate-your-wordpress-rss-feeds/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 11:37:28 +0000</pubDate>
		<dc:creator>Editorial Staff</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[add custom fields to wordpress rss]]></category>
		<category><![CDATA[add custom text to your wordpress rss]]></category>
		<category><![CDATA[add custom title to your wordpress rss]]></category>
		<category><![CDATA[add rss footer]]></category>
		<category><![CDATA[how to add content in your wordpress rss feeds]]></category>
		<category><![CDATA[rss tutorial]]></category>
		<category><![CDATA[wordpress tutorial]]></category>

		<guid isPermaLink="false">http://www.wpbeginner.com/?p=1200</guid>
		<description><![CDATA[<p>This article which will show you how to add any type of content in your WordPress RSS Feeds. This hack will put you in control of your WordPress RSS Feeds and you can manipulate it in anyway you want. </p><p>To leave a comment please visit <a href="http://www.wpbeginner.com/wp-tutorials/how-to-add-content-and-completely-manipulate-your-wordpress-rss-feeds/">How to Add Content and Completely Manipulate Your WordPress RSS Feeds</a> on <a href="http://www.wpbeginner.com/" target="_blank" rel="friend">WPBeginner</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>A while back we shared <a href="http://www.wpbeginner.com/plugins/control-your-rss-feeds-footer-in-wordpress/">how you can control your WordPress RSS Footer</a> with a use of a famous plugin called RSS Footer by Joost. While the plugin is great, but it is very limited. You can only add text to the footer, and it is always the same text displayed on each post&#8217;s footer. What if you want to display different text for each post in your RSS post? What if you want specific posts to have a different title in RSS Feeds? What if you want to display a specific custom field in your RSS Feeds? Well this is why we present you this article which will show you how to add any type of content in your WordPress RSS Feeds. This hack will put you in control of your WordPress RSS Feeds and you can manipulate it in anyway you want. </p>
<p>Note: This hack is not for beginners. Only users who feel comfortable with editing functions.php file and have some knowledge of php should try this. Beginner users should either use the plugin mentioned in the article above, or consult professionals like us to do it for you.</p>
<h4>1. Add a Custom Field to your WordPress RSS Footer</h4>
<p>In this first example, we will show you how you can use custom field to display specific text/object in your WordPress RSS Feed. This trick will allow you to show different text, advertisement, image, or anything else for each post. First open your functions.php and paste the following codes in the php tags:</p>
<pre class="brush: php; title: ; notranslate">
function wpbeginner_postrss($content) {
global $wp_query;
$postid = $wp_query-&gt;post-&gt;ID;
$coolcustom = get_post_meta($postid, 'coolcustom', true);
if(is_feed()) {
if($coolcustom !== '') {
$content = $content.&quot;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&quot;.$coolcustom.&quot;&lt;/div&gt;
&quot;;
}
else {
$content = $content;
}
}
return $content;
}
add_filter('the_excerpt_rss', 'wpbeginner_postrss');
add_filter('the_content', 'wpbeginner_postrss');
</pre>
<p>Now most of you are wondering how this code is functioning. So here is an explanation. We create a function called wpbeginner_postrss which runs a global wp_query to search in each post if a custom field called &#8220;coolcustom&#8221; is defined. If Cool Custom is defined then it shows the value after the post content. If there is no custom field defined, then the function by default shows just the post content and nothing else. We use the variable $content to display content.  We are using if(is_feed) function and adding the custom text or other content to the main post content itself which you can see by the second filter. But it will only be displayed in the RSS Feeds due to our user of if(is_feed) function. By doing it this way, we avoid all the compatibility issues. </p>
<p>Some of you will say but you just did what RSS footer plugin does with a function. Yes and NO. Yes we are adding the code at the footer of the post, but this text is not the same exact text for each post. It is different because you specify different text for each post via custom fields. This trick will be very handy to comply with the new FTC guidelines for blogs that have all different type of posts.</p>
<h4>2. Adding Additional Text to Post Titles in RSS</h4>
<p>Does your blog have guest posts, sponsored posts, and review posts? Well if you do then you will find this very useful. Some bloggers have custom styling to display each different type of post, so their users can distinguish between them. But when these posts go in a reader, all the stylings are gone. That is when this trick comes in handy. In this trick we will add any text either before or after the title.</p>
<p>For example if your title was &#8220;Commercial WordPress Theme &#8211; <a href="http://www.wpbeginner.com/refer/studiopress/"rel="nofollow" target="_blank" >StudioPress</a>&#8221; and it was a sponsored post, then you can change it to &#8220;Sponsored Post: Commercial WordPress Theme &#8211; <a href="http://www.wpbeginner.com/refer/studiopress/"rel="nofollow" target="_blank" >StudioPress</a>&#8221;. Same if someone wrote a guest post etc.</p>
<p>To accomplish this, open your functions.php file and add the following code in there:</p>
<pre class="brush: php; title: ; notranslate">
    function wpbeginner_titlerss($content) {
    global $wp_query;
    $postid = $wp_query-&gt;post-&gt;ID;
    $gpost = get_post_meta($postid, 'guest_post', true);
    $spost = get_post_meta($postid, 'sponsored_post', true);

    if($gpost !== '') {
    $content = 'Guest Post: '.$content;
    }
    elseif ($spost !== ''){
    $content = 'Sponsored Post: '.$content;
    }
    else {
    $content = $content;
    }
    return $content;
    }
    add_filter('the_title_rss', 'wpbeginner_titlerss');
</pre>
<p>Explanation for the code: </p>
<p>We are using the function called wpbeginner_titlerss which runs a global wp_query to search in each post if it contains either $gpost or $spost. These two elements are basically looking for two specific custom fields called &#8220;guest_post&#8221; or &#8220;sponsored_post&#8221;. If anyone has these custom fields added with a value true, then the code will add it in the text. If not then you will just see the normal title. You can see first the code looks for if $gpost is true, if that is not true whether $spost is true. If that is not also not defined, then it displays normal content. But if either one of them was true, then it displays the different text you specify here. We are using $content string to display the post title.</p>
<p>Now that was just displaying custom fields in the title. Do you want to display Category name on each title? Well then you should simply paste the following code in your functions.php file:</p>
<pre class="brush: php; title: ; notranslate">
function wpbeginner_cattitlerss($content) {
$postcat = &quot;&quot;;
foreach((get_the_category()) as $cat) {
$postcat .= ' ('.$cat-&gt;cat_name . ')';
}
$content = $content.$postcat;
return $content;
}
add_filter('the_title_rss', 'wpbeginner_cattitlerss');
</pre>
<p>Explanation: We are using the function wpbgeinner_cattitlerss to get the category ID for each post and then displaying that right next to the title. So if the title is &#8220;Get Contact Form 7&#8243; now it would be &#8220;Get Contact Form 7 [Plugins]&#8220;. You can see that there is no if then variable in this code. We use $content for the main title and $postcat variable to define the category name. You rearrange that if you like.</p>
<h4>3. Add Same Text on all Posts in RSS</h4>
<p>If you just want to add the same text then you might as well use the plugin called RSS Footer by Joost because it is easier. But if you want to do it yourself this is how you do it. Open your functions.php file add the following code:</p>
<pre class="brush: php; title: ; notranslate">
function wpbeginner_postrss($content) {
if(is_feed()){
$content = 'This post was written by Syed Balkhi '.$content.'Check out WPBeginner';
}
return $content;
}
add_filter('the_excerpt_rss', 'wpbeginner_postrss');
add_filter('the_content', 'wpbeginner_postrss');
</pre>
<p>Explanation: We are calling a function wpbeginner_postrss to add in each post a content before the post saying This Post was written by Syed Balkhi and after the content Check out WPBeginner. But we add the function if(is_feed), so it will only be displayed in RSS Feeds.</p>
<p>This would be very helpful if you wanted to sell ads on specific posts in RSS, add custom FTC guidelines or just wanted to have more control over your RSS Feeds.</p>
<p>Source: We used Joost&#8217;s RSS Footer plugin for a lot of guidance in writing this tutorial. The title RSS hack part we got from a <a href="http://www.webinventif.fr/wordpress-ajouter-du-contenu-dans-son-flux/">French tutorial site</a> and we added our own variables and gave it the ability to be custom titles per custom field.</p>
<p>To leave a comment please visit <a href="http://www.wpbeginner.com/wp-tutorials/how-to-add-content-and-completely-manipulate-your-wordpress-rss-feeds/">How to Add Content and Completely Manipulate Your WordPress RSS Feeds</a> on <a href="http://www.wpbeginner.com/" target="_blank" rel="friend">WPBeginner</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.wpbeginner.com/wp-tutorials/how-to-add-content-and-completely-manipulate-your-wordpress-rss-feeds/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
		<item>
		<title>How to Display a Category only if it has Posts in WordPress</title>
		<link>http://www.wpbeginner.com/wp-tutorials/how-to-display-a-category-only-if-it-has-posts-in-wordpress/</link>
		<comments>http://www.wpbeginner.com/wp-tutorials/how-to-display-a-category-only-if-it-has-posts-in-wordpress/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 20:10:31 +0000</pubDate>
		<dc:creator>Editorial Staff</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[category hack]]></category>
		<category><![CDATA[category trick]]></category>
		<category><![CDATA[display category]]></category>
		<category><![CDATA[display category only it if has post]]></category>
		<category><![CDATA[php snippet]]></category>
		<category><![CDATA[template tutorial]]></category>
		<category><![CDATA[theme hack]]></category>
		<category><![CDATA[theme tutorial]]></category>
		<category><![CDATA[wordpress tutorial]]></category>

		<guid isPermaLink="false">http://www.wpbeginner.com/?p=1151</guid>
		<description><![CDATA[<p>This snippet that we are sharing in this article is helpful in very custom designs. By default you can use <a href="http://codex.wordpress.org/Template_Tags/wp_list_categories" target="_blank">wp_list_categories</a> function to display categories, and it only displays categories if it has posts. Sometimes when you are customizing WordPress, you might need to use it this way.</p><p>To leave a comment please visit <a href="http://www.wpbeginner.com/wp-tutorials/how-to-display-a-category-only-if-it-has-posts-in-wordpress/">How to Display a Category only if it has Posts in WordPress</a> on <a href="http://www.wpbeginner.com/" target="_blank" rel="friend">WPBeginner</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>This snippet that we are sharing in this article is helpful in very custom designs. By default you can use <a href="http://codex.wordpress.org/Template_Tags/wp_list_categories" target="_blank">wp_list_categories</a> function to display categories, and it only displays categories if it has posts. Sometimes when you are customizing WordPress, you might need to use it this way. When we were working on a client&#8217;s project, we found a need for this snippet, therefore we are sharing it for anyone else who can use it.</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php if (get_category('17')-&gt;category_count &gt; 0) echo get_category('17')-&gt;cat_name; ?&gt; 
</pre>
<p>In the method above we are specifying the category ID for very specific category if you want to check, but you can do this with all categories also. Just paste the snippet below where you want it.</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php foreach (get_categories() as $category){
if ($category-&gt;count &gt; 0){
echo $category-&gt;cat_name;
}
} ?&gt;
</pre>
<p>Now how would you use it? Well sometimes you have a category with a specific name, but you want to display the link with a different anchor text, and you only want to display it if it has posts, this way can be handy. So for instance in your navigation menu, you can enter something like this:</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php if (get_category('17')-&gt;category_count &gt; 0) echo &quot;&lt;a href=\&quot;&quot;.get_bloginfo('home').&quot;/category/news/\&quot;&gt;Blog&lt;/a&gt;&quot;; ?&gt;
</pre>
<p>This will check if category 17 has any posts, if it does, then it will display the navigation menu item called Blog, otherwise it would not.</p>
<p>It&#8217;s very simple and easy, but for those new developers it can be helpful.</p>
<p>To leave a comment please visit <a href="http://www.wpbeginner.com/wp-tutorials/how-to-display-a-category-only-if-it-has-posts-in-wordpress/">How to Display a Category only if it has Posts in WordPress</a> on <a href="http://www.wpbeginner.com/" target="_blank" rel="friend">WPBeginner</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.wpbeginner.com/wp-tutorials/how-to-display-a-category-only-if-it-has-posts-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Protect WordPress Against Malicious URL Requests</title>
		<link>http://www.wpbeginner.com/plugins/protect-wordpress-against-malicious-url-requests/</link>
		<comments>http://www.wpbeginner.com/plugins/protect-wordpress-against-malicious-url-requests/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 13:19:19 +0000</pubDate>
		<dc:creator>Editorial Staff</dc:creator>
				<category><![CDATA[WordPress Plugins]]></category>
		<category><![CDATA[protect wordpress against malicious URL requests]]></category>
		<category><![CDATA[security tips for wordpress]]></category>
		<category><![CDATA[wordpress admin panel security]]></category>
		<category><![CDATA[wordpress injection attack]]></category>
		<category><![CDATA[wordpress security]]></category>
		<category><![CDATA[wordpress site security]]></category>
		<category><![CDATA[wordpress sql injections]]></category>
		<category><![CDATA[wordpress tutorial]]></category>

		<guid isPermaLink="false">http://www.wpbeginner.com/?p=1140</guid>
		<description><![CDATA[<p>In early September, many WordPress sites were infected with Malicious codes. We wrote a quick fix for that issue which you can see in <a href="http://www.wpbeginner.com/news/wordpress-sql-injection-latest-attack/">this post</a>, but recently Jeff Starr from <a href="http://perishablepress.com/" target="_blank">Perishable Press</a> has come with a solution to protect WordPress from future attacks as well. </p><p>To leave a comment please visit <a href="http://www.wpbeginner.com/plugins/protect-wordpress-against-malicious-url-requests/">Protect WordPress Against Malicious URL Requests</a> on <a href="http://www.wpbeginner.com/" target="_blank" rel="friend">WPBeginner</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>In early September, many WordPress sites were infected with Malicious codes. We wrote a quick fix for that issue which you can see in <a href="http://www.wpbeginner.com/news/wordpress-sql-injection-latest-attack/">this post</a>, but recently Jeff Starr from <a href="http://perishablepress.com/" target="_blank">Perishable Press</a> has come with a solution to protect WordPress from future attacks as well. </p>
<p>Simply open a new php file and paste the following codes:</p>
<blockquote><p>&lt;?php<br />
/*<br />
Plugin Name: Block Bad Queries<br />
Plugin URI: http://perishablepress.com/press/2009/12/22/protect-wordpress-against-malicious-url-requests/<br />
Description: Protect WordPress Against Malicious URL Requests<br />
Author URI: http://perishablepress.com/<br />
Author: Perishable Press<br />
Version: 1.0<br />
*/<br />
global $user_ID; if($user_ID) {<br />
	if(!current_user_can(&#39;level_10&#39;)) {<br />
		if (strlen($_SERVER[&#39;REQUEST_URI&#39;]) &gt; 255 ||<br />
			strpos($_SERVER[&#39;REQUEST_URI&#39;], &quot;eval(&quot;) ||<br />
			strpos($_SERVER[&#39;REQUEST_URI&#39;], &quot;CONCAT&quot;) ||<br />
			strpos($_SERVER[&#39;REQUEST_URI&#39;], &quot;UNION SELECT&quot;) ||<br />
			strpos($_SERVER[&#39;REQUEST_URI&#39;], &quot;base64&quot;)) {<br />
				@header(&quot;HTTP/1.1 414 Request-URI Too Long&quot;);<br />
				@header(&quot;Status: 414 Request-URI Too Long&quot;);<br />
				@header(&quot;Connection: Close&quot;);<br />
				@exit;<br />
		}<br />
	}<br />
} ?&gt;</p></blockquote>
<p>Codes updated on Jan. 10, 2010.</p>
<p>Save this file and upload it in your plugin directory /wp-content/plugins/ and your work is done. This script will check for long strings as well as base64 code which was in the last attack and the eval( code which could be a threat in the future.</p>
<p>Once active, this plugin will silently and effectively close any connections for these sorts of injection-type attacks.</p>
<p>Source: <a href="http://perishablepress.com/press/2009/12/22/protect-wordpress-against-malicious-url-requests/" target="_blank">Perishable Press</a></p>
<p>To leave a comment please visit <a href="http://www.wpbeginner.com/plugins/protect-wordpress-against-malicious-url-requests/">Protect WordPress Against Malicious URL Requests</a> on <a href="http://www.wpbeginner.com/" target="_blank" rel="friend">WPBeginner</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.wpbeginner.com/plugins/protect-wordpress-against-malicious-url-requests/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>How to Disable HTML in WordPress Comments</title>
		<link>http://www.wpbeginner.com/wp-tutorials/how-to-disable-html-in-wordpress-comments/</link>
		<comments>http://www.wpbeginner.com/wp-tutorials/how-to-disable-html-in-wordpress-comments/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 15:55:24 +0000</pubDate>
		<dc:creator>Editorial Staff</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[disable html in wordpress comments]]></category>
		<category><![CDATA[disable html tags in wordpress]]></category>
		<category><![CDATA[disabling html tags in wordpress comments]]></category>
		<category><![CDATA[how to disable html in wordpress comments]]></category>
		<category><![CDATA[prevent spam by disabling html in wordpress comments]]></category>
		<category><![CDATA[wordpress html tags]]></category>
		<category><![CDATA[wordpress tutorial]]></category>

		<guid isPermaLink="false">http://www.wpbeginner.com/?p=1103</guid>
		<description><![CDATA[<p>By default, WordPress allows certain HTML tags within the comments such as &#60;a&#62; &#60;em&#62; &#60;strong&#62; etc. If you notice a lot of SPAM comments also contain these tags. In this tutorial we will show you how you can disable HTML tags in your WordPress comments.</p><p>To leave a comment please visit <a href="http://www.wpbeginner.com/wp-tutorials/how-to-disable-html-in-wordpress-comments/">How to Disable HTML in WordPress Comments</a> on <a href="http://www.wpbeginner.com/" target="_blank" rel="friend">WPBeginner</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>By default, WordPress allows certain HTML tags within the comments such as &lt;a&gt; &lt;em&gt; &lt;strong&gt; etc. If you notice a lot of SPAM comments also contain these tags. Most SPAM comments are made by bots and scripts, which are using HTML tags. If you simply disable HTML from your WordPress comments, it can prevent a lot of SPAM. In this tutorial we will show you how you can disable HTML tags in your WordPress comments.</p>
<p>This tutorial will only disable active HTML tags. So someone can still post something like:</p>
<p>&amp;lt;a&amp;gt;&amp;lt;em&amp;gt;&amp;lt;strong&amp;gt;</p>
<p>And it will show up, but the tags will not be functional. So if someone uses the strong tag, it won&#8217;t bold the text. Besides not many SPAM bots have time to do this because this way takes up a lot of time and it is not beneficial for them.</p>
<p>All you have to do is simply open your <em>functions.php</em> and add the following code:</p>
<pre class="brush: php; title: ; notranslate">
    // This will occur when the comment is posted
    function plc_comment_post( $incoming_comment ) {

    // convert everything in a comment to display literally
    $incoming_comment['comment_content'] = htmlspecialchars($incoming_comment['comment_content']);

    // the one exception is single quotes, which cannot be #039; because WordPress marks it as spam
    $incoming_comment['comment_content'] = str_replace( &quot;'&quot;, '&amp;apos;', $incoming_comment['comment_content'] );

    return( $incoming_comment );
    }

    // This will occur before a comment is displayed
    function plc_comment_display( $comment_to_display ) {

    // Put the single quotes back in
    $comment_to_display = str_replace( '&amp;apos;', &quot;'&quot;, $comment_to_display );

    return $comment_to_display;
</pre>
<p><a href="http://www.theblog.ca/literal-comments" target="_blank">Source</a> &#8211; The original author also offers a plugin that you can download from his site.</p>
<p>The reason why this way is better is because it does not require you to change the core files. If you want to edit your core files then you may go to <em>wp-includes/kses.php</em> and edit the codes there. (This is not Recommended, but it is here for the sake of knowledge. (<a href="http://codex.wordpress.org/FAQ_Working_with_WordPress#How_do_I_stop_people_from_posting_HTML_in_comments.3F" target="_blank">WP Codex </a>for more details)</p>
<p>To leave a comment please visit <a href="http://www.wpbeginner.com/wp-tutorials/how-to-disable-html-in-wordpress-comments/">How to Disable HTML in WordPress Comments</a> on <a href="http://www.wpbeginner.com/" target="_blank" rel="friend">WPBeginner</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.wpbeginner.com/wp-tutorials/how-to-disable-html-in-wordpress-comments/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>How to Disable RSS Feeds in WordPress</title>
		<link>http://www.wpbeginner.com/wp-tutorials/how-to-disable-rss-feeds-in-wordpress/</link>
		<comments>http://www.wpbeginner.com/wp-tutorials/how-to-disable-rss-feeds-in-wordpress/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 15:34:07 +0000</pubDate>
		<dc:creator>Editorial Staff</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[disable rss feeds]]></category>
		<category><![CDATA[rss hack]]></category>
		<category><![CDATA[rss tricks]]></category>
		<category><![CDATA[wordpress hack]]></category>
		<category><![CDATA[wordpress rss]]></category>
		<category><![CDATA[wordpress tutorial]]></category>

		<guid isPermaLink="false">http://www.wpbeginner.com/?p=1082</guid>
		<description><![CDATA[<p>In this article we will show you how you can disable RSS Feeds without editing the core file by simply creating a function in WordPress.</p><p>To leave a comment please visit <a href="http://www.wpbeginner.com/wp-tutorials/how-to-disable-rss-feeds-in-wordpress/">How to Disable RSS Feeds in WordPress</a> on <a href="http://www.wpbeginner.com/" target="_blank" rel="friend">WPBeginner</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>WordPress is one of the best Content Management System (CMS) available. There will be times that you will create a static website and does not want to implement RSS Feeds. But that feature is automatically included in WordPress and in order to turn it off, you would have to edit core files. But in this article we will show you how you can disable RSS Feeds without editing the core file by simply creating a function in WordPress.</p>
<p>Open your functions.php located within your <a href="http://www.wpbeginner.com/wp-themes/wordpress-theme-cheat-sheet-for-beginners/">themes folder</a> and add the following code:</p>
<pre class="brush: php; title: ; notranslate">
    function fb_disable_feed() {
    wp_die( __('No feed available,please visit our &lt;a href=&quot;'. get_bloginfo('url') .'&quot;&gt;homepage&lt;/a&gt;!') );
    }

    add_action('do_feed', 'fb_disable_feed', 1);
    add_action('do_feed_rdf', 'fb_disable_feed', 1);
    add_action('do_feed_rss', 'fb_disable_feed', 1);
    add_action('do_feed_rss2', 'fb_disable_feed', 1);
    add_action('do_feed_atom', 'fb_disable_feed', 1);
    add_action('do_feed_rss2_comments', 'fb_disable_feed', 1);
    add_action('do_feed_atom_comments', 'fb_disable_feed', 1);
</pre>
<p>Once you add this code, anytime someone tries to reach your feeds, they will see this message: &#8220;No feed available, please visit our homepage.&#8221; You can change the message to fit your needs.</p>
<p>Source: <a href="http://wpengineer.com/disable-wordpress-feed/" target="_blank">Frank from WPEngineer</a></p>
<p>To leave a comment please visit <a href="http://www.wpbeginner.com/wp-tutorials/how-to-disable-rss-feeds-in-wordpress/">How to Disable RSS Feeds in WordPress</a> on <a href="http://www.wpbeginner.com/" target="_blank" rel="friend">WPBeginner</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.wpbeginner.com/wp-tutorials/how-to-disable-rss-feeds-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Official Facebook Share Count Button for your WordPress</title>
		<link>http://www.wpbeginner.com/wp-tutorials/official-facebook-share-count-button-for-your-wordpress/</link>
		<comments>http://www.wpbeginner.com/wp-tutorials/official-facebook-share-count-button-for-your-wordpress/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 23:10:13 +0000</pubDate>
		<dc:creator>Editorial Staff</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[facebook and wordpress]]></category>
		<category><![CDATA[facebook tutorial]]></category>
		<category><![CDATA[integrate facebook]]></category>
		<category><![CDATA[power of facebook]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress tutorial]]></category>

		<guid isPermaLink="false">http://www.wpbeginner.com/?p=1066</guid>
		<description><![CDATA[<p>Not too long ago we shared how you can add a <a href="http://www.wpbeginner.com/wp-tutorials/how-to-add-a-live-facebook-share-button-to-your-wordpress/">live facebook share button</a> in your WordPress site using a third party script. Well Facebook has decided to release the official version of the fshare count button, so why rely on the third party script anymore? </p><p>To leave a comment please visit <a href="http://www.wpbeginner.com/wp-tutorials/official-facebook-share-count-button-for-your-wordpress/">Official Facebook Share Count Button for your WordPress</a> on <a href="http://www.wpbeginner.com/" target="_blank" rel="friend">WPBeginner</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Not too long ago we shared how you can add a <a href="http://www.wpbeginner.com/wp-tutorials/how-to-add-a-live-facebook-share-button-to-your-wordpress/">live facebook share button</a> in your WordPress site using a third party script. Well Facebook has decided to release the official version of the fshare count button, so why rely on the third party script anymore? </p>
<p>To add the Official Facebook Share button simply open up a theme file of your choice and add the following code:</p>
<pre class="brush: php; title: ; notranslate">
&lt;a name=&quot;fb_share&quot; type=&quot;box_count&quot; href=&quot;http://www.facebook.com/sharer.php&quot;&gt;Share&lt;/a&gt;&lt;script src=&quot;http://static.ak.fbcdn.net/connect.php/js/FB.Share&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
</pre>
<p>The code above will add a big tweetmeme like button that will display count in more like a box form. If you want to display a compact version then simply use the code below:</p>
<pre class="brush: php; title: ; notranslate">
&lt;a name=&quot;fb_share&quot; type=&quot;button_count&quot; href=&quot;http://www.facebook.com/sharer.php&quot;&gt;Share&lt;/a&gt;&lt;script src=&quot;http://static.ak.fbcdn.net/connect.php/js/FB.Share&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
</pre>
<p>Feel free to wrap the codes around with any styling that you like. For further documentation and options visit the <a href="http://wiki.developers.facebook.com/index.php/Facebook_Share/Specifying_Meta_Tags#Configuring_Meta_Tags_for_Facebook_Share" target="_blank">Official Facebook page</a>.</p>
<p>To leave a comment please visit <a href="http://www.wpbeginner.com/wp-tutorials/official-facebook-share-count-button-for-your-wordpress/">Official Facebook Share Count Button for your WordPress</a> on <a href="http://www.wpbeginner.com/" target="_blank" rel="friend">WPBeginner</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.wpbeginner.com/wp-tutorials/official-facebook-share-count-button-for-your-wordpress/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>How to Display the Latest Sticky Posts in WordPress</title>
		<link>http://www.wpbeginner.com/wp-tutorials/how-to-display-the-latest-sticky-posts-in-wordpress/</link>
		<comments>http://www.wpbeginner.com/wp-tutorials/how-to-display-the-latest-sticky-posts-in-wordpress/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 14:44:50 +0000</pubDate>
		<dc:creator>Editorial Staff</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[featured post slider]]></category>
		<category><![CDATA[latest sticky post]]></category>
		<category><![CDATA[slider content]]></category>
		<category><![CDATA[sticky post]]></category>
		<category><![CDATA[wordpress tutorial]]></category>

		<guid isPermaLink="false">http://www.wpbeginner.com/?p=1034</guid>
		<description><![CDATA[<p>WordPress has this very cool feature called stick posts. When you make a post sticky, it shows up above your new posts, but only if your theme is set to be that way. In this tutorial we will show you a trick that will let you display latest sticky posts anywhere in your WordPress theme.</p><p>To leave a comment please visit <a href="http://www.wpbeginner.com/wp-tutorials/how-to-display-the-latest-sticky-posts-in-wordpress/">How to Display the Latest Sticky Posts in WordPress</a> on <a href="http://www.wpbeginner.com/" target="_blank" rel="friend">WPBeginner</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>WordPress has this very cool feature called stick posts. When you make a post sticky, it shows up above your new posts, but only if your theme is set to be that way. In this tutorial we will show you a trick that will let you display latest sticky posts anywhere in your WordPress theme. </p>
<p>Assuming that you have already created a <a href="http://www.wpbeginner.com/wp-themes/how-to-create-a-custom-page-in-wordpress/" target="_blank">custom page template</a> and/or already have <a href="http://codex.wordpress.org/The_Loop" target="_blank">The Loop</a> ready, paste the following code before the loop.</p>
<pre class="brush: php; title: ; notranslate">
    &lt;?php
    /* Get all sticky posts */
    $sticky = get_option( 'sticky_posts' );

    /* Sort the stickies with the newest ones at the top */
    rsort( $sticky );

    /* Get the 5 newest stickies (change 5 for a different number) */
    $sticky = array_slice( $sticky, 0, 5 );

    /* Query sticky posts */
    query_posts( array( 'post__in' =&gt; $sticky, 'caller_get_posts' =&gt; 1 ) );
    ?&gt;
</pre>
<p>This code can very well be used in featured slider, or any other advanced feature that you would like to display on your site. This snippet is mostly geared toward a WordPress site that has a <a href="http://www.wpbeginner.com/wp-themes/how-to-create-a-custom-homepage-in-wordpress/">custom homepage</a> or a magazine style look.</p>
<p>The credit to this code goes to <a href="http://justintadlock.com/archives/2009/03/28/get-the-latest-sticky-posts-in-wordpress" target="_blank">Justin Tadlock</a> and partially to <a href="http://www.nathanrice.net/" target="_blank">Nathan Rice</a> for coming up with the array slice solution.</p>
<p>To leave a comment please visit <a href="http://www.wpbeginner.com/wp-tutorials/how-to-display-the-latest-sticky-posts-in-wordpress/">How to Display the Latest Sticky Posts in WordPress</a> on <a href="http://www.wpbeginner.com/" target="_blank" rel="friend">WPBeginner</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.wpbeginner.com/wp-tutorials/how-to-display-the-latest-sticky-posts-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>How to Create a Page that Displays a Random Post in WordPress</title>
		<link>http://www.wpbeginner.com/wp-themes/how-to-create-a-page-that-displays-a-random-post-in-wordpress/</link>
		<comments>http://www.wpbeginner.com/wp-themes/how-to-create-a-page-that-displays-a-random-post-in-wordpress/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 13:55:47 +0000</pubDate>
		<dc:creator>Editorial Staff</dc:creator>
				<category><![CDATA[Themes]]></category>
		<category><![CDATA[display random post in a page]]></category>
		<category><![CDATA[random browsing]]></category>
		<category><![CDATA[random post]]></category>
		<category><![CDATA[random redirect]]></category>
		<category><![CDATA[stumbleupon like browsing in WordPress]]></category>
		<category><![CDATA[wordpress tutorial]]></category>

		<guid isPermaLink="false">http://www.wpbeginner.com/?p=1027</guid>
		<description><![CDATA[<p>In this post we will show you how you can create a page that displays a random post in WordPress, so you can simply send your user to that page and they can read a new post every time they refresh the page.</p><p>To leave a comment please visit <a href="http://www.wpbeginner.com/wp-themes/how-to-create-a-page-that-displays-a-random-post-in-wordpress/">How to Create a Page that Displays a Random Post in WordPress</a> on <a href="http://www.wpbeginner.com/" target="_blank" rel="friend">WPBeginner</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>We mentioned a plugin that allows you to have <a href="http://www.wpbeginner.com/plugins/stumbleupon-like-browsing-for-your-wordpress-blog/">Stumbleupon like Browsing</a> system in WordPress. The problem with that plugin is that it redirects a user to the actual URL which can create some user end issues such as page not loading, redirect error etc. In this post we will show you how you can create a page that displays a random post in WordPress, so you can simply send your user to that page and they can read a new post every time they refresh the page.</p>
<p><strong>EDIT (11/29/2012): We are no longer using this technique because it prevented us from showing proper social buttons. Instead we have a <a href="http://www.wpbeginner.com/wp-tutorials/how-to-redirect-users-to-a-random-post-in-wordpress/" title="Redirect users to a random post in WordPress">new method</a> that allows you to redirect the user to a random post using /random/. This method is much better. Read more about <a href="http://www.wpbeginner.com/wp-tutorials/how-to-redirect-users-to-a-random-post-in-wordpress/" title="Redirect users to a random post in WordPress">How to redirect users to a random post in WordPress</a>.</strong></p>
<p><strong>Step 1</strong>: of this tutorial is to create a <a href="http://www.wpbeginner.com/wp-themes/how-to-create-a-custom-page-in-wordpress/">custom page template in WordPress</a>.</p>
<p><strong>Step 2</strong>: Add the following code in your custom page template:</p>
<pre class="brush: php; title: ; notranslate">&lt;?php
query_posts(array('orderby' =&gt; 'rand', 'showposts' =&gt; 1));
if (have_posts()) :
while (have_posts()) : the_post(); ?&gt;

&lt;h1&gt;&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h1&gt;

&lt;?php the_content(); ?&gt;

&lt;?php endwhile;
endif; ?&gt;</pre>
<p>That&#8217;s it. Depending on the name that you choose for the page, you can now create a button in your navbar for users to click on that page and view a random post.</p>
<h4><a href="http://www.wpbeginner.com/random/" target="_blank">Live Example</a></h4>
<p> (Simply refresh a page to see a new post)</p>
<p>To leave a comment please visit <a href="http://www.wpbeginner.com/wp-themes/how-to-create-a-page-that-displays-a-random-post-in-wordpress/">How to Create a Page that Displays a Random Post in WordPress</a> on <a href="http://www.wpbeginner.com/" target="_blank" rel="friend">WPBeginner</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.wpbeginner.com/wp-themes/how-to-create-a-page-that-displays-a-random-post-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Ultimate Guide to Upgrade WordPress for Beginners [Infograph]</title>
		<link>http://www.wpbeginner.com/beginners-guide/ultimate-guide-to-upgrade-wordpress-for-beginners-infograph/</link>
		<comments>http://www.wpbeginner.com/beginners-guide/ultimate-guide-to-upgrade-wordpress-for-beginners-infograph/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 01:48:47 +0000</pubDate>
		<dc:creator>Editorial Staff</dc:creator>
				<category><![CDATA[Beginners Guide]]></category>
		<category><![CDATA[how to upgrade wordpress]]></category>
		<category><![CDATA[how you should upgrade wordpress]]></category>
		<category><![CDATA[ultimate guide to wordpress]]></category>
		<category><![CDATA[upgrade wordpress]]></category>
		<category><![CDATA[why you should upgrade wordpress]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress beginner's guide to update wordpress]]></category>
		<category><![CDATA[wordpress hack]]></category>
		<category><![CDATA[wordpress infograph]]></category>
		<category><![CDATA[wordpress tutorial]]></category>
		<category><![CDATA[wordpress upgrade guide for dummies]]></category>

		<guid isPermaLink="false">http://www.wpbeginner.com/?p=998</guid>
		<description><![CDATA[<p>For this article we have created an infograph featuring a research that Syed has conducted over the past two years with hacked WordPress blogs. This infograph also shows a step by step guide to upgrade WordPress.
</p><p>To leave a comment please visit <a href="http://www.wpbeginner.com/beginners-guide/ultimate-guide-to-upgrade-wordpress-for-beginners-infograph/">Ultimate Guide to Upgrade WordPress for Beginners [Infograph]</a> on <a href="http://www.wpbeginner.com/" target="_blank" rel="friend">WPBeginner</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Having the most up to date version of WordPress is crucial for your blog&#8217;s security. <a href="http://wordpress.org/development/2009/09/keep-wordpress-secure/">WordPress blog</a> went to extreme measures on emphasizing the point that users must upgrade their blog for security reasons. For this article we have created an infograph featuring a research that Syed has conducted over the past two years with hacked WordPress blogs. This infograph also shows a step by step guide to upgrade WordPress.</p>
<p>Many people feel hesitant to upgrade because the plugins will break and the site might not function well. But is it better to fix the small problem, or is it better to get your site hacked, then restore everything, and upgrade and fix everything later. It is best if you take the first route as it will be easier and time saving.</p>
<p><a href="http://www.wpbeginner.com/beginners-guide/ultimate-guide-to-upgrade-wordpress-for-beginners-infograph/?display=wide"><img src="http://cdn.wpbeginner.com/infographs/upgradewordpressinfographmini.gif" alt="Ultimate Guide to Upgrade WordPress" /></a></p>
<p>Click on the Image to see the full chart.</p>
<p>This should be your reference guide at all times when making an upgrade to your WordPress blog. We must emphasize that it is extremely crucial that you stay up to date with the latest version. </p>
<p>While this is not the only step to increase security, this is certainly one of the most important ones. If you want to see how else you can protect your WordPress blog, check out our <a href="http://www.wpbeginner.com/wp-tutorials/11-vital-tips-and-hacks-to-protect-your-wordpress-admin-area/">WordPress security post</a>.</p>
<p>A lot of people do not pay attention to plugin upgrades, but Plugins can play a huge factor in your blog&#8217;s security. Each time a developer releases an update, they also post a bug fix report. A lot of times, they mention some of the security loopholes they fixed. Now when the hacker sees that you are using an older version of a plugin, they already know how to break your site. Don&#8217;t make their job easy. Upgrade now.</p>
<p>If you need any assistance in upgrading your WordPress blog, WPBeginner is glad to help out for a small fee. If you are having any other issue, do not post in the comment. It is best to email us using the contact form.</p>
<p>If you have any suggestions for new users who are upgrading their WordPress blog, please post it in the comment area.</p>
<p><strong>Credit:</strong></p>
<p>While we had plans to release this in advance, the steps in the flow chart were inspired from <a href="http://twitter.com/kuzzuk">Kuzzuk Sabba</a> and used with his permission.</p>
<p>To leave a comment please visit <a href="http://www.wpbeginner.com/beginners-guide/ultimate-guide-to-upgrade-wordpress-for-beginners-infograph/">Ultimate Guide to Upgrade WordPress for Beginners [Infograph]</a> on <a href="http://www.wpbeginner.com/" target="_blank" rel="friend">WPBeginner</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.wpbeginner.com/beginners-guide/ultimate-guide-to-upgrade-wordpress-for-beginners-infograph/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>How to Display Random Posts in WordPress</title>
		<link>http://www.wpbeginner.com/wp-tutorials/how-to-display-random-posts-in-wordpress/</link>
		<comments>http://www.wpbeginner.com/wp-tutorials/how-to-display-random-posts-in-wordpress/#comments</comments>
		<pubDate>Sat, 10 Oct 2009 13:06:15 +0000</pubDate>
		<dc:creator>Editorial Staff</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[display random posts]]></category>
		<category><![CDATA[list posts randomly]]></category>
		<category><![CDATA[random posts]]></category>
		<category><![CDATA[wordpress sidebar element]]></category>
		<category><![CDATA[wordpress snippet]]></category>
		<category><![CDATA[wordpress tutorial]]></category>

		<guid isPermaLink="false">http://www.wpbeginner.com/?p=953</guid>
		<description><![CDATA[<p>One of the easiest way to give a new life to your older posts is by displaying them in the sidebar. In this tutorial, we will share how you can display random posts in your WordPress.</p><p>To leave a comment please visit <a href="http://www.wpbeginner.com/wp-tutorials/how-to-display-random-posts-in-wordpress/">How to Display Random Posts in WordPress</a> on <a href="http://www.wpbeginner.com/" target="_blank" rel="friend">WPBeginner</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Due to the natural structure of blogs, articles end up being buried down once they get old. Most new users join and pick up from the moment they join, and they never bother going back to one of your good posts. One of the easiest way to give a new life to your older posts is by displaying them in the sidebar. In this tutorial, we will share how you can display random posts in your WordPress.</p>
<p>All you have to do is open your <em>sidebar.php</em>, or any other file you like to add it in and paste the following code:</p>
<pre class="brush: php; title: ; notranslate">
&lt;li&gt;&lt;h2&gt;Random Post&lt;/h2&gt;
&lt;ul&gt;
&lt;?php $posts = get_posts('orderby=rand&amp;numberposts=5'); foreach($posts as $post) { ?&gt;
&lt;li&gt;&lt;a href=&quot;&lt;?php the_permalink(); ?&gt;&quot; title=&quot;&lt;?php the_title(); ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;?php } ?&gt;
&lt;/ul&gt;
&lt;/li&gt;
</pre>
<p>You can customize the styling around it. If you want to display more than 5 posts, simply change the number 5 to the number of your choice.</p>
<p>To leave a comment please visit <a href="http://www.wpbeginner.com/wp-tutorials/how-to-display-random-posts-in-wordpress/">How to Display Random Posts in WordPress</a> on <a href="http://www.wpbeginner.com/" target="_blank" rel="friend">WPBeginner</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.wpbeginner.com/wp-tutorials/how-to-display-random-posts-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Content Delivery Network via cdn.wpbeginner.com

 Served from: www.wpbeginner.com @ 2013-05-25 23:51:05 by W3 Total Cache -->