How To Control Access To Your Blog Content In The Blink Of An Eye
This post is using a new plugin called Hide This. You can get a copy from edwards.org. What it does is let your wrap content within your post in two special tags; <!--hidethis--> and <!--/hidethis-->. Then everything between those tags will be removed from your post before it is displayed to anyone who is not logged in as a subscriber to your blog.
This allows you to provide special subscriber only information embeded right in your posts so that you don't have the problems associated with some posts being available to everyone and some being hidden. It's a much more elegant solution to providing special subscriber only information within an otherwise public blog.
So what's in the hidden portion of this post?
Well, you'll have to get your

All Access Pass to find out. It's free and easy.
Here's the subscriber only portion of this post. if you log out you'll see an ad in my sidebar asking prople to subscribe to this blog to be able to see this content. And, incedentally, you won't see this portion of the post any more.
The way I accomplished this is by using the following code.
get_currentuserinfo();
if( empty($user_login)) { ?>
<li><br /><br /><h2>All Access Pass</h2>
<a href="http://danemorgan.com/wp-register.php" title="Get Your All Access Pass Here!">
<img src="http://danemorgan.com/images/all-access-pass.jpg" /></a><br />
<a href="http://danemorgan.com/wp-register.php" title="Get Your All Access Pass Here!">
Get your All Access Pass to DaneMorgan.com</a>
- Many posts here have special subscriber only information.
When you get you <strong>free all access pass</strong> these special sections will be instantly available to you.
You'll also be instantly notified of new posts and receive special Pass Holder Only notifications and
information.<br />
<a href="http://danemorgan.com/wp-register.php" title="Get Your All Access Pass Here!">
Get Your All Access Insider Pass Now!</a>
</li>
<?php } ?>
What this does is check to see if the current user has a username associated to them. If they do, then it skips the html between the php statements, but if they don't it gets included. Since if you have a username you are by default logged in, I don't need to tell you about subscribing, so I hide it from you.
Trackback URL for this post:
Bookmark & Share: Click, Copy and Link:








Post new comment