Skip to content

Instantly share code, notes, and snippets.

@Pleiades
Created November 15, 2012 22:09
Show Gist options
  • Save Pleiades/4081683 to your computer and use it in GitHub Desktop.
Save Pleiades/4081683 to your computer and use it in GitHub Desktop.
Display Content to Registered Users Only
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 '';
}
[member]My super secret content.[/member]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment