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 ''; }
Esempio di inserimento con tag
[member] This text will be only displayed to registered users. [/member]
http://www.wprecipes.com/wordpress-shortcode-display-content-to-registered-users-only
wmh
Nessun commento:
Posta un commento