<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: How To Show Content For Specific Users In WordPress Templates</title>
	<atom:link href="http://www.bravenewcode.com/2008/05/how-to-show-content-for-specific-users-in-wordpress-templates/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bravenewcode.com/2008/05/how-to-show-content-for-specific-users-in-wordpress-templates/</link>
	<description>You dream it up, we code it to life.</description>
	<lastBuildDate>Fri, 03 Feb 2012 14:14:10 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Dale Mugford</title>
		<link>http://www.bravenewcode.com/2008/05/how-to-show-content-for-specific-users-in-wordpress-templates/comment-page-2/#comment-5540</link>
		<dc:creator>Dale Mugford</dc:creator>
		<pubDate>Mon, 15 Mar 2010 16:48:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.bravenewcode.com/?p=114#comment-5540</guid>
		<description>Whatever template files you want to use them in : )</description>
		<content:encoded><![CDATA[<p>Whatever template files you want to use them in : )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arif</title>
		<link>http://www.bravenewcode.com/2008/05/how-to-show-content-for-specific-users-in-wordpress-templates/comment-page-2/#comment-5539</link>
		<dc:creator>Arif</dc:creator>
		<pubDate>Mon, 15 Mar 2010 16:42:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.bravenewcode.com/?p=114#comment-5539</guid>
		<description>Hi Dale; 

I am very new to all this wordpress stuff, and am just feeling may way around and learning as I go, my question is in which of the file does all this code reside?

thanks</description>
		<content:encoded><![CDATA[<p>Hi Dale; </p>
<p>I am very new to all this wordpress stuff, and am just feeling may way around and learning as I go, my question is in which of the file does all this code reside?</p>
<p>thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jack</title>
		<link>http://www.bravenewcode.com/2008/05/how-to-show-content-for-specific-users-in-wordpress-templates/comment-page-2/#comment-4397</link>
		<dc:creator>Jack</dc:creator>
		<pubDate>Sun, 21 Jun 2009 16:25:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.bravenewcode.com/?p=114#comment-4397</guid>
		<description>actually not by using ajax and js, just when the user entered to the site see a line that said the admin is off or not, i used also wp-useronline and made an echo to return when admin with his special user is online, so show &quot;online&quot; and if not &quot;offline&quot; but a problem that there is, the code returns only &quot;online&quot; coz the useronline knows the ip and cookie, like whenever u comment on a site, when u wanna again comment u see your name and email is in their fields without filling them again. so it&#039;s not a good way, i&#039;m just trying to find sth to simply show it. thanks</description>
		<content:encoded><![CDATA[<p>actually not by using ajax and js, just when the user entered to the site see a line that said the admin is off or not, i used also wp-useronline and made an echo to return when admin with his special user is online, so show &#8220;online&#8221; and if not &#8220;offline&#8221; but a problem that there is, the code returns only &#8220;online&#8221; coz the useronline knows the ip and cookie, like whenever u comment on a site, when u wanna again comment u see your name and email is in their fields without filling them again. so it&#8217;s not a good way, i&#8217;m just trying to find sth to simply show it. thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dale Mugford</title>
		<link>http://www.bravenewcode.com/2008/05/how-to-show-content-for-specific-users-in-wordpress-templates/comment-page-2/#comment-4395</link>
		<dc:creator>Dale Mugford</dc:creator>
		<pubDate>Sun, 21 Jun 2009 15:16:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.bravenewcode.com/?p=114#comment-4395</guid>
		<description>Well &#039;logged in&#039; could still mean they&#039;ve left to the site, depending on whether they&#039;ve told wordpress to &#039;remember me&#039; or not. That checkbox determines whether someone is logged in only with a browser session cookie, or the cookie lasts beyond the browser session and they can come back and still be logged in.

What I&#039;m trying to determine is if you&#039;re looking for whether they&#039;re &#039;online&#039; as in &lt;em&gt;at the site at that moment&lt;/em&gt; or not.</description>
		<content:encoded><![CDATA[<p>Well &#8216;logged in&#8217; could still mean they&#8217;ve left to the site, depending on whether they&#8217;ve told wordpress to &#8216;remember me&#8217; or not. That checkbox determines whether someone is logged in only with a browser session cookie, or the cookie lasts beyond the browser session and they can come back and still be logged in.</p>
<p>What I&#8217;m trying to determine is if you&#8217;re looking for whether they&#8217;re &#8216;online&#8217; as in <em>at the site at that moment</em> or not.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jack</title>
		<link>http://www.bravenewcode.com/2008/05/how-to-show-content-for-specific-users-in-wordpress-templates/comment-page-2/#comment-4389</link>
		<dc:creator>Jack</dc:creator>
		<pubDate>Sun, 21 Jun 2009 07:49:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.bravenewcode.com/?p=114#comment-4389</guid>
		<description>i don&#039;t wanna make it hard to just echo &quot;online&quot; or &quot;offline&quot; just if there is a function to use like is_user_logged_in, it will be better</description>
		<content:encoded><![CDATA[<p>i don&#8217;t wanna make it hard to just echo &#8220;online&#8221; or &#8220;offline&#8221; just if there is a function to use like is_user_logged_in, it will be better</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dale Mugford</title>
		<link>http://www.bravenewcode.com/2008/05/how-to-show-content-for-specific-users-in-wordpress-templates/comment-page-2/#comment-4382</link>
		<dc:creator>Dale Mugford</dc:creator>
		<pubDate>Sat, 20 Jun 2009 21:40:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.bravenewcode.com/?p=114#comment-4382</guid>
		<description>I take it you mean you want other users to know when an admin is around, correct? If so, you&#039;d need javascript and Ajax to accomplish that.</description>
		<content:encoded><![CDATA[<p>I take it you mean you want other users to know when an admin is around, correct? If so, you&#8217;d need javascript and Ajax to accomplish that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jack</title>
		<link>http://www.bravenewcode.com/2008/05/how-to-show-content-for-specific-users-in-wordpress-templates/comment-page-2/#comment-4375</link>
		<dc:creator>Jack</dc:creator>
		<pubDate>Sat, 20 Jun 2009 18:50:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.bravenewcode.com/?p=114#comment-4375</guid>
		<description>i don&#039;t wanna use the code for current user i wanna echo &quot;Online&quot; for example, if admin is logged in wordpress. thanks</description>
		<content:encoded><![CDATA[<p>i don&#8217;t wanna use the code for current user i wanna echo &#8220;Online&#8221; for example, if admin is logged in wordpress. thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dale Mugford</title>
		<link>http://www.bravenewcode.com/2008/05/how-to-show-content-for-specific-users-in-wordpress-templates/comment-page-1/#comment-4371</link>
		<dc:creator>Dale Mugford</dc:creator>
		<pubDate>Sat, 20 Jun 2009 13:09:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.bravenewcode.com/?p=114#comment-4371</guid>
		<description>@&lt;a href=&quot;#comment-4370&quot; rel=&quot;nofollow&quot;&gt;Jack&lt;/a&gt;: Well the &lt;code&gt;if (current_user_can(&#039;level_10&#039;))&lt;/code&gt; takes care of that.</description>
		<content:encoded><![CDATA[<p>@<a href="#comment-4370" rel="nofollow">Jack</a>: Well the <code>if (current_user_can('level_10'))</code> takes care of that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jack</title>
		<link>http://www.bravenewcode.com/2008/05/how-to-show-content-for-specific-users-in-wordpress-templates/comment-page-1/#comment-4370</link>
		<dc:creator>Jack</dc:creator>
		<pubDate>Sat, 20 Jun 2009 11:37:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.bravenewcode.com/?p=114#comment-4370</guid>
		<description>thanks for useful post, but what can we use for show if admin is logged in or not, for example if (is_admin_logged_in()), anything like this ?
thanks</description>
		<content:encoded><![CDATA[<p>thanks for useful post, but what can we use for show if admin is logged in or not, for example if (is_admin_logged_in()), anything like this ?<br />
thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dale Mugford</title>
		<link>http://www.bravenewcode.com/2008/05/how-to-show-content-for-specific-users-in-wordpress-templates/comment-page-1/#comment-4009</link>
		<dc:creator>Dale Mugford</dc:creator>
		<pubDate>Thu, 09 Apr 2009 04:16:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.bravenewcode.com/?p=114#comment-4009</guid>
		<description>You&#039;re welcome- I&#039;ll likely write another one, a little more advanced that ties into the types of content you can serve up based on roles, such as author interactivity on the front end.</description>
		<content:encoded><![CDATA[<p>You&#8217;re welcome- I&#8217;ll likely write another one, a little more advanced that ties into the types of content you can serve up based on roles, such as author interactivity on the front end.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: greendude</title>
		<link>http://www.bravenewcode.com/2008/05/how-to-show-content-for-specific-users-in-wordpress-templates/comment-page-1/#comment-3920</link>
		<dc:creator>greendude</dc:creator>
		<pubDate>Thu, 26 Mar 2009 21:31:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.bravenewcode.com/?p=114#comment-3920</guid>
		<description>Awesome stuff! thank you.</description>
		<content:encoded><![CDATA[<p>Awesome stuff! thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pumpkinslayer</title>
		<link>http://www.bravenewcode.com/2008/05/how-to-show-content-for-specific-users-in-wordpress-templates/comment-page-1/#comment-2177</link>
		<dc:creator>pumpkinslayer</dc:creator>
		<pubDate>Mon, 17 Nov 2008 17:13:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.bravenewcode.com/?p=114#comment-2177</guid>
		<description>After searching Google for quite a while, this is the best article I&#039;ve found on how to take advantage of the roles in templates. Thanks.</description>
		<content:encoded><![CDATA[<p>After searching Google for quite a while, this is the best article I&#8217;ve found on how to take advantage of the roles in templates. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dgold</title>
		<link>http://www.bravenewcode.com/2008/05/how-to-show-content-for-specific-users-in-wordpress-templates/comment-page-1/#comment-2175</link>
		<dc:creator>Dgold</dc:creator>
		<pubDate>Mon, 17 Nov 2008 09:20:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.bravenewcode.com/?p=114#comment-2175</guid>
		<description>Thank you So Much for this helpful post.  I learned it, and was able to implement this on my sidebar tonite.  I use 2 other plugins, that help in association with this:  Login Redirect sends you back to the page you were on when you clicked Login.  TDO Mini Forms lets users submit posts from the Frontend.  Now users will never need to see the wp-Admin and the Dashboard.  Using your code, I put it so the &quot;Site Admin&quot; login (from the wp_register function) only appears after you are logged in as Admin.</description>
		<content:encoded><![CDATA[<p>Thank you So Much for this helpful post.  I learned it, and was able to implement this on my sidebar tonite.  I use 2 other plugins, that help in association with this:  Login Redirect sends you back to the page you were on when you clicked Login.  TDO Mini Forms lets users submit posts from the Frontend.  Now users will never need to see the wp-Admin and the Dashboard.  Using your code, I put it so the &#8220;Site Admin&#8221; login (from the wp_register function) only appears after you are logged in as Admin.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://www.bravenewcode.com/2008/05/how-to-show-content-for-specific-users-in-wordpress-templates/comment-page-1/#comment-169</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Fri, 02 May 2008 12:18:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.bravenewcode.com/?p=114#comment-169</guid>
		<description>@DUANE: &quot;...most examples here, we?ll favor readability over other criteria...&quot;

understood, thanks for the clarification!</description>
		<content:encoded><![CDATA[<p>@DUANE: &#8220;&#8230;most examples here, we?ll favor readability over other criteria&#8230;&#8221;</p>
<p>understood, thanks for the clarification!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Duane Storey</title>
		<link>http://www.bravenewcode.com/2008/05/how-to-show-content-for-specific-users-in-wordpress-templates/comment-page-1/#comment-167</link>
		<dc:creator>Duane Storey</dc:creator>
		<pubDate>Fri, 02 May 2008 05:48:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.bravenewcode.com/?p=114#comment-167</guid>
		<description>There are obviously many different ways you can write the same piece of code. The speed of an if else pair is relatively insignificant well taken into the context of the tens of database calls that happen within WordPress on some pages.   For most examples here, we&#039;ll favor readability over other criteria such as speed, unless of course the code fragment demands fast execution or is involved in a big tight loop.</description>
		<content:encoded><![CDATA[<p>There are obviously many different ways you can write the same piece of code. The speed of an if else pair is relatively insignificant well taken into the context of the tens of database calls that happen within WordPress on some pages.   For most examples here, we&#8217;ll favor readability over other criteria such as speed, unless of course the code fragment demands fast execution or is involved in a big tight loop.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dale Mugford</title>
		<link>http://www.bravenewcode.com/2008/05/how-to-show-content-for-specific-users-in-wordpress-templates/comment-page-1/#comment-166</link>
		<dc:creator>Dale Mugford</dc:creator>
		<pubDate>Fri, 02 May 2008 05:43:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.bravenewcode.com/?p=114#comment-166</guid>
		<description>Sure, I realize it&#039;s PHP hyperbole- but I&#039;m considering mild to moderate WordPress users who can digest this, and make something of it. Also, the example is meant to be extrapolated such that you could have chunks of code for specific users, and the if statements would let users do that easily.

Additionally, WordPress typically documents in this fashion. An example of the PHP hyperbole can be found in the default WordPress template for archives.

P.S-&gt; Our spam monster ate your first comment. I forced it to wretch and give it back : )</description>
		<content:encoded><![CDATA[<p>Sure, I realize it&#8217;s PHP hyperbole- but I&#8217;m considering mild to moderate WordPress users who can digest this, and make something of it. Also, the example is meant to be extrapolated such that you could have chunks of code for specific users, and the if statements would let users do that easily.</p>
<p>Additionally, WordPress typically documents in this fashion. An example of the PHP hyperbole can be found in the default WordPress template for archives.</p>
<p>P.S-> Our spam monster ate your first comment. I forced it to wretch and give it back : )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://www.bravenewcode.com/2008/05/how-to-show-content-for-specific-users-in-wordpress-templates/comment-page-1/#comment-164</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Fri, 02 May 2008 05:22:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.bravenewcode.com/?p=114#comment-164</guid>
		<description>Wouldn&#039;t a switch function be a little more elegant than elseif? Or perhaps an array would be even more flexible:
http://ca.php.net/manual/en/control-structures.switch.php#70652</description>
		<content:encoded><![CDATA[<p>Wouldn&#8217;t a switch function be a little more elegant than elseif? Or perhaps an array would be even more flexible:<br />
<a href="http://ca.php.net/manual/en/control-structures.switch.php#70652" rel="nofollow">http://ca.php.net/manual/en/control-structures.switch.php#70652</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

