<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>WordPress &#8250; Support Topic: Make part of posts private</title>
<link>http://wordpress.org/support/</link>
<description>WordPress &#8250; Support Topic: Make part of posts private</description>
<language>en</language>
<pubDate>Tue, 24 Nov 2009 02:20:45 +0000</pubDate>

<item>
<title>MichaelH on "Make part of posts private"</title>
<link>http://wordpress.org/support/topic/266732#post-1063082</link>
<pubDate>Sat, 02 May 2009 23:51:55 +0000</pubDate>
<dc:creator>MichaelH</dc:creator>
<guid isPermaLink="false">1063082@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Another wonder of WordPress--how many times coders come up with almost the same exact code.&#60;/p&#62;
&#60;p&#62;Code from wp-private:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;#39;the_content&#38;#39;, &#38;#39;protected_content&#38;#39;);

function protected_content($content) {
global $current_user, $user_ID;

if (($current_user-&#38;gt;id == 0) &#38;amp;amp;&#38;amp;amp; ($user_ID == 0)){

	$begin = strpos($content, &#38;#39;&#38;lt;!--protected--&#38;gt;&#38;#39;);
	$end = strpos($content, &#38;#39;&#38;lt;!--/protected--&#38;gt;&#38;#39;);

	$prefix = substr($content,0,$begin);
        $message = &#38;#39;&#38;lt;div id=&#38;quot;wp-private-box&#38;quot;&#38;gt;&#38;lt;b&#38;gt;This is protected content. Please &#38;lt;a href=&#38;quot;&#38;#39; . get_option(&#38;#39;siteurl&#38;#39;) . &#38;#39;/wp-login.php&#38;quot;&#38;gt;Login&#38;lt;/a&#38;gt; or &#38;lt;a href=&#38;quot;&#38;#39; . get_option(&#38;#39;siteurl&#38;#39;) . &#38;#39;/wp-register.php&#38;quot;&#38;gt;Register&#38;lt;/a&#38;gt; for access.&#38;lt;/b&#38;gt;&#38;lt;/div&#38;gt;&#38;#39;;
	$suffix .= substr($content,$end,strlen($content));

	return $prefix.$message.$suffix;

} else { return $content; }

}

?&#38;gt;&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>MichaelH on "Make part of posts private"</title>
<link>http://wordpress.org/support/topic/266732#post-1063078</link>
<pubDate>Sat, 02 May 2009 23:47:03 +0000</pubDate>
<dc:creator>MichaelH</dc:creator>
<guid isPermaLink="false">1063078@http://wordpress.org/support/</guid>
<description>&#60;p&#62;And the plugin Hidethis had this code:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;#39;the_content&#38;#39;, &#38;#39;hide_some_content&#38;#39;);

function hide_some_content($content) {
global $current_user, $user_ID;

if (($current_user-&#38;gt;id == 0) &#38;amp;amp;&#38;amp;amp; ($user_ID == 0)){

	$b = strpos($content, &#38;#39;&#38;lt;!--hidethis--&#38;gt;&#38;#39;);
	$e = strpos($content, &#38;#39;&#38;lt;!--/hidethis--&#38;gt;&#38;#39;);

	$pre = substr($content,0,$b);
	$suf .= substr($content,$e,strlen($content));

	return $pre.$suf;

} else { return $content; }

}

?&#38;gt;&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>MichaelH on "Make part of posts private"</title>
<link>http://wordpress.org/support/topic/266732#post-1063077</link>
<pubDate>Sat, 02 May 2009 23:41:45 +0000</pubDate>
<dc:creator>MichaelH</dc:creator>
<guid isPermaLink="false">1063077@http://wordpress.org/support/</guid>
<description>&#60;p&#62;You plugin is also very similar to &#60;a href=&#34;http://alanwho.com/web-development/wordpress/plugins/protectcontent/&#34; rel=&#34;nofollow&#34;&#62;http://alanwho.com/web-development/wordpress/plugins/protectcontent/&#60;/a&#62; which is no longer supported, but was this code:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;#39;the_content&#38;#39;, &#38;#39;protect_content&#38;#39;);

function protect_content($content) {
global $current_user, $user_ID;

if (($current_user-&#38;gt;id == 0) &#38;amp;amp;&#38;amp;amp; ($user_ID == 0)){

$b = strpos($content, &#38;#39;&#38;lt;!--protectcontent--&#38;gt;&#38;#39;);

$e = strpos($content, &#38;#39;&#38;lt;!--/protectcontent--&#38;gt;&#38;#39;);

	$pre = substr($content,0,$b);
	$suf .= substr($content,$e,strlen($content));

	return $pre.$suf;

} else { return $content; }

}

?&#38;gt;&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>namith.jawahar on "Make part of posts private"</title>
<link>http://wordpress.org/support/topic/266732#post-1062919</link>
<pubDate>Sat, 02 May 2009 19:27:10 +0000</pubDate>
<dc:creator>namith.jawahar</dc:creator>
<guid isPermaLink="false">1062919@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Seems related...I just downloaded and checked what hidepost does...&#60;/p&#62;
&#60;p&#62;This is the fun with wordpress...90% of the things you need will already be done and shared by someone else...I love wordpress for that..&#60;/p&#62;
&#60;p&#62;Anyways I would recommend wp-private to newbies who just want the functionality shown above and hidepost to advanced users who wish for more control
&#60;/p&#62;</description>
</item>
<item>
<title>MichaelH on "Make part of posts private"</title>
<link>http://wordpress.org/support/topic/266732#post-1061160</link>
<pubDate>Thu, 30 Apr 2009 18:28:07 +0000</pubDate>
<dc:creator>MichaelH</dc:creator>
<guid isPermaLink="false">1061160@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Related??? &#60;a href=&#34;http://wordpress.org/extend/plugins/hidepost/&#34; rel=&#34;nofollow&#34;&#62;http://wordpress.org/extend/plugins/hidepost/&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>namith.jawahar on "Make part of posts private"</title>
<link>http://wordpress.org/support/topic/266732#post-1061151</link>
<pubDate>Thu, 30 Apr 2009 18:23:38 +0000</pubDate>
<dc:creator>namith.jawahar</dc:creator>
<guid isPermaLink="false">1061151@http://wordpress.org/support/</guid>
<description>&#60;p&#62;We often wish to provide some teaser content to visitors while keeping a part of the content reserved for registered users so that they will be lured to register on our site.  This plugin helps you achieve exactly this.  You will be able to mark a part of your post as private and the rest will be available to public and a register or login link will appear where your privatized content is supposed to appear. Once the user logs in they will be able to see the whole content (Great for membership sites). Now you can show off parts of your site to visitors and reserve parts for registered users.&#60;/p&#62;
&#60;p&#62;Download Link : &#60;a href=&#34;http://smartlogix.co.in/wp-private/&#34; rel=&#34;nofollow&#34;&#62;http://smartlogix.co.in/wp-private/&#60;/a&#62;
&#60;/p&#62;</description>
</item>

</channel>
</rss>
