<?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>Ladysign Dev Blog &#187; user roles</title>
	<atom:link href="http://www.ladysign-apps.com/blog/tag/user-roles/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ladysign-apps.com/blog</link>
	<description>Girls can code.</description>
	<lastBuildDate>Mon, 12 Dec 2011 16:58:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>User roles based Wordpress site</title>
		<link>http://www.ladysign-apps.com/blog/code/wordpress/user-roles-based-wordpress-site/</link>
		<comments>http://www.ladysign-apps.com/blog/code/wordpress/user-roles-based-wordpress-site/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 11:02:16 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[user roles]]></category>
		<category><![CDATA[user roles based template]]></category>

		<guid isPermaLink="false">http://www.ladysign-apps.com/blog/?p=910</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 2 out of 5 stars<br />
For a client of me, I had to create a website, where the frontpage<br />
has a loginbox. Only registered users, can access the [......]</p><p class='read-more'><a href='http://www.ladysign-apps.com/blog/code/wordpress/user-roles-based-wordpress-site/'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 2 out of 5 stars<br />
For a client of me, I had to create a website, where the frontpage<br />
has a loginbox. Only registered users, can access the full website.<br />
The solution for this in Wordpress is a template based on user roles.<br />
Please review the code below:</p>
<pre class="brush: php; title: ;">&lt;?php
	global $current_user;
	get_currentuserinfo();
	if($current_user-&gt;user_level &gt;= 1){
?&gt;	

&lt;div id=&quot;container&quot;&gt;
..LOGGED IN SITE
&lt;/div&gt;

&lt;?php
	} else {
?&gt;

&lt;div id=&quot;container&quot;&gt;
..GUEST SITE
&lt;/div&gt;

&lt;?php
}
&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/wordpress/user-roles-based-wordpress-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

