This code snippet hides the content of a post that is defined as exclusive from not logged in users. To achieve this you have to create a new category. Name it “Exclusive Content only for Members” or what ever you like and set the Slug to “only-for-members”. Now you can create exclusive member content by just assigning this category to a post. If no user is logged in, the excerpt will be displayed instead of the full content. The snippet also shows a message that the content is avialable only for registered users plus a link to the login page. If registration of new users is allowed also a link to the registration page is shown.