<?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: Display Private Posts to Logged in Users</title>
	<atom:link href="http://wpengineer.com/1906/display-private-posts-to-logged-in-users/feed/" rel="self" type="application/rss+xml" />
	<link>http://wpengineer.com/1906/display-private-posts-to-logged-in-users/</link>
	<description>WordPress News, Hacks, Tips, Tutorials, Plugins and Themes</description>
	<lastBuildDate>Tue, 22 May 2012 12:01:09 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Alt Design</title>
		<link>http://wpengineer.com/1906/display-private-posts-to-logged-in-users/#comment-3568</link>
		<dc:creator>Alt Design</dc:creator>
		<pubDate>Tue, 23 Feb 2010 16:07:55 +0000</pubDate>
		<guid isPermaLink="false">http://wpengineer.com/?p=1906#comment-3568</guid>
		<description>Can&#039;t understand why you&#039;re using a custom field &quot;private&quot;... Maybe i&#039;m wrong but... how about do something like this:

if ($post-&gt;status == &#039;private&#039; ) {
  if ( is_user_logged_in() ) {
   // display private post, only logged users
  }
 } else {
  // display public post, for every visitors
 }</description>
		<content:encoded><![CDATA[<p>Can't understand why you're using a custom field "private"... Maybe i'm wrong but... how about do something like this:</p>
<p>if ($post-&gt;status == 'private' ) {<br />
  if ( is_user_logged_in() ) {<br />
   // display private post, only logged users<br />
  }<br />
 } else {<br />
  // display public post, for every visitors<br />
 }</p>
]]></content:encoded>
	</item>
</channel>
</rss>

