Created
November 15, 2012 22:09
-
-
Save Pleiades/4081683 to your computer and use it in GitHub Desktop.
Display Content to Registered Users Only
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ''; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[member]My super secret content.[/member] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment