- Home
- Categorie
- Coding e Sistemistica
- CMS & Piattaforme Self-Hosted
- Widget logic
- 
							
							
							
							
							
Widget logicSalve a tutti, ho installato il plugin in oggetto per escludere un link da tutte le pagine di un blog, tranne che nella home page. Dal file readme del plugin: is_home()-- just the main blog page- !is_page('about')-- everywhere EXCEPT this specific WP 'page'
- is_category(array(5,9,10,11))-- category page of one of the given category IDs
- is_single() && in_category('baked-goods')-- single post that's in the category with this slug
- current_user_can('level_10')-- admin only widget
- 
`strpos($_SERVER['HTTP_REFERER'], "google.com")!=false` -- widget to show when clicked through from a google search
- is_category() && in_array($cat, get_term_children( 5, 'category'))-- category page that's a descendent of category 5
- global $post; return (in_array(77,get_post_ancestors($post)));-- WP page that is a child of page 77
- global $post; return (is_page('home') || ($post->post_parent=="13"));-- home page OR the page that's a child of page 13
 Qual è il codice da inserire? Dovrebbere essere !is_single() , ma non funziona. Qualcuno può aiutarmi? Grazie in anticipo 
 
- 
							
							
							
							
							In pratica vuoi caricare un widget solo nella home page? Se è così, devi utilizzare il seguente codice: is_home() 
 
- 
							
							
							
							
							
@giapox said: In pratica vuoi caricare un widget solo nella home page? Se è così, devi utilizzare il seguente codice: Ok, grazie. Avevo comunque risolto...