- » Dec 1, 2009
- » How To
» Wordpress
How To: Display Content To Registered Users Only
Do you ever wanted to show content only to to registered users that are logged into your site? If yes, then here is a really fast the solution:
Just paste the following code on your functions.php file:
[php]
add_shortcode( ‘member’, ‘member_check_shortcode’ );
function member_check_shortcode( $atts, $content = null ) {
if ( is_user_logged_in() && !is_null( $content ) && !is_feed() )
return $content;
return ”;
}
[/php]
Then, all you must do is add some content in between your [member] tags when writing a post or page like so:
[member]
This content is only for members.
[/member]
That’s all. If you enjoyed this article, please consider sharing it!
Related search terms:
you must be registered to view this content, wordpress only registered user show, wordpress only for registered users, wordpress gallery only for registred users, wordpress Display content to registered users only, wordpress display content registered, wordpress content registered users only, wordpress content for registered users only, wordpress content for registered users, wordpress only registered users view content, wordpress only show content to logged in users, wordpress page registered users only, wordpress show some content only to registered users, wordpress show page to registered only, wordpress Show Data for Registered/Logged User only, wordpress show data for logged users, wordpress show content only to registered, wordpress show content only to certain users, wordpress registered user content, wordpress registered to view content, show only registerd wordpress, show just to registered wordpress, show images only to registered user wordpress, How To Display Content for registred users wordpress, function member_check_shortcode( $atts $content = null ) { if ( is_user_logged_in() && !is_null( $content ) && !is_feed() ) return $content; return ;, Display content to registered users only wordpress plugin, display content to registered users only wordpress, display content to registered users, display content to members only, display content to logged in user wordpress, Display Content Only To Registered Users in wordpress, how to display something for registered users only, how to see content for registered users, How to Show Data for Registered User, Show Data for Registered/Logged User only css, Show Data for Registered/Logged User, show article for registered users wordpress, plugin wordpress show content registered -shortcode, php showing content only to members, php show content user, php display registered users, if ( ( !is_user_logged_in() && !is_null( $content ) ) || is_feed() ) return $comment;, css show registered users specific content





![Appulo.us Troll Bridge [Question/ Answers]](http://www.zlwo.com/wp-content/uploads/2009/11/appulous-preview-150x150.jpg)
![New iPhone Virus Spy Out Personal Data [WARNING]](http://www.zlwo.com/wp-content/uploads/2009/11/iphone-virus-150x150.jpg)


![Free Vector Graphic and illustration Resources [ZLWOlist]](http://www.zlwo.com/wp-content/uploads/2009/12/free-vector-150x150.jpg)
Learn How To Create a Wordpress Theme in Photoshop
You might also like: