Visualizzazione 2 filoni di risposte
Visualizzazione 2 filoni di risposte
- Devi essere connesso per rispondere a questo topic.
Email: info@wpitaly.it
Home › Forum › Problemi Vari con WP › problema con sidebar condizionata
Ciao a tutti,
sto cercando di fare in modo che quando carico un articolo, la sidebar cambi in funzione del tipo di categoria di appartenenza dell’articolo.
ho fatto una cosa del genere:
<?php
if (is_tag('laghi')){
include(TEMPLATEPATH."/sidebar_natura.php");
}else{
include(TEMPLATEPATH."/sidebar.php");
}
?>
oppure
<?php
if (is_category('natura')){
include(TEMPLATEPATH."/sidebar_natura.php");
}else{
include(TEMPLATEPATH."/sidebar.php");
}
?>
ma non riesco a caricare la sidebar alternativa.
Funziona regolarmente solo se richiamo l’articolo cosi:
<?php
if (is_single('garda')){
include(TEMPLATEPATH."/sidebar_natura.php");
}else{
include(TEMPLATEPATH."/sidebar.php");
}
?>
dove sta il problema? uso la versione 2.64 si wp scaricata da questo sito.
grazie
Lory
la 2.6.4 NON esiste ed è una versione hackerizzata e NON l’hai scaricata da qui.
c’è un post ad hoc nel blog di wrdpress-it
la 2.6.4 NON esiste ed è una versione hackerizzata e NON l’hai scaricata da qui.
c’è un post ad hoc nel blog di wrdpress-it
scusa wolly è la 2.6.2 non la 2.6.4, ho sbagliato io.
WPItaly - Copyright Creative Commons: CC BY-NC-SA 4.0