/ Published in: PHP
Usage:
[hide]Hide content for guest[/hide]
*Doesn't work on comments!
add this into your function.php template file
Expand |
Embed | Plain Text
<?php add_shortcode("hide","hide_shortcode"); function hide_shortcode($x,$text=null){ if(!is_user_logged_in()){ return "You have to been registered and logged in to see this content"; }else{ return do_shortcode($text); } } ?>
You need to login to post a comment.
