- Home
- Categorie
- Coding e Sistemistica
- CMS & Piattaforme Self-Hosted
- Links View Registered Users Only
- 
							
							
							
							
							
Links View Registered Users OnlyCiao tutti, 
 Per favore mi dite un plugin wordpress che mi permete di nasconde i links ai visitatori guest ?
 Grazie mille
 
- 
							
							
							
							
							Senza plugin ma aggiungendo questa funzione nel file functions.php del tuo tema [PHP]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 sprintf( __('Questo contenuto è riservato solo agli utenti registrati! Per vederlo %s</a> o fai il <a href="%s">login</a>!'), wp_register('', '', false), wp_login_url() ); // Otherwise, return the hidden contents}[/PHP]Nel post metti il contenuto che non vuoi far vedere in questo modo [PHP][member]Testo visibile solo dagli utenti registrati.[/member][/PHP] 
 
- 
							
							
							
							
							
@elmanisero said: Senza plugin ma aggiungendo questa funzione nel file functions.php del tuo tema [PHP]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 sprintf( __('Questo contenuto è riservato solo agli utenti registrati! Per vederlo %s</a> o fai il <a href="%s">login</a>!'), wp_register('', '', false), wp_login_url() ); // Otherwise, return the hidden contents}[/PHP]Nel post metti il contenuto che non vuoi far vedere in questo modo [PHP][member]Testo visibile solo dagli utenti registrati.[/member][/PHP] Grazie mille, ha funnzionato alla grande. 
 
- 
							
							
							
							
							Prego, spero possa servire anche ad altri.