Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- add_shortcode( 'private', 'cool_private_shortcode' );
- function cool_private_shortcode( $atts, $content ) {
- if ( is_user_logged_in() ) {
- return $content;
- } else {
- return 'You need to log in to view this content.';
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement