Home › Forum › Plugin e temi di WP › Colori diversi per categoria
-
AutorePost
-
-
11 Febbraio 2009 alle 3:47 #9422naftalinaPartecipante
Ciao volevo sapere se era possibile cambiare il colore per le varie categorie dato che mi occupo di video game avere dei colori diversi per ogni console in giro o trovato questo plugin: GYS Themed Categories che da come dice cambia il colore del tema seconda come si vuole ma non capisco come . Preciso che il thema che sto usando già all’interno possiede uno switcher con i vari colori già impostati e li vorrei usare per le mie categorie posso avere il vostro aiuto grazie
-
11 Febbraio 2009 alle 14:59 #62535SteveAglAmministratore del forum
con degli if nell’header per caricare css diversi a seconda della categoria usando is_category per verificare se sei in una data categoria.
-
11 Febbraio 2009 alle 16:52 #62548naftalinaPartecipante
Scusa ma per me parli arabo sono poco pratico di queste cose mi potresti spiegare meglio per favore grazie
-
11 Febbraio 2009 alle 17:58 #62558SteveAglAmministratore del forum
nell’header dove viene “emesso” il CSS si avrà una cosa del tipo:
<?php if ( in_category(5) ) {
echo ‘< link rel=”stylesheet” href=”http://ilcssperlacategoria5″ type=”text/css” media=”screen” / >’;
} elseif ( in_category( ) {
echo ‘< link rel=”stylesheet” href=”http://ilcssperlacategoria8″ type=”text/css” media=”screen” / >’;
}
?>
il codice html ha spazi aggiuntivi dopo prima di < e >
-
11 Febbraio 2009 alle 23:10 #62578naftalinaPartecipante
Scusa ma non capisco bene sono un po duro devo inserire questo codice con il percorso del css nella header ? Giusto ed inserire il numero della categoria ?
-
12 Febbraio 2009 alle 6:45 #62581SteveAglAmministratore del forum
Si esatto, dove nel tuo tema si richiama il foglio stile sostituirai il codice sopra metttendo gli ID di categoria che ti servono e ripetendo l’elseif tante volte quanto ti serve se hai 4 categorie per 4 stili avrai un if e 3 elsif
-
12 Febbraio 2009 alle 21:14 #62635naftalinaPartecipante
ma quello che già esiste lo cambio con questo giusto ? ed aggiungo le varie categorie ed il nome del css?
-
13 Febbraio 2009 alle 7:25 #62643SteveAglAmministratore del forum
si
-
13 Febbraio 2009 alle 16:57 #62676naftalinaPartecipante
quindi scusami dove dovrei inserire il codice:
<!-- CSS -->
<style type="text/css">body {background:#666 url(<?php ot_site_bg(); ?>);}.header{background:url(<?php ot_logo_bg(); ?>) no-repeat bottom right;}</style>
<style type="text/css" media="screen"><!-- @import url( <?php bloginfo('stylesheet_url'); ?> ); --></style>
<style type="text/css" media="screen"><!-- @import url( <?php echo get_option('home'); ?>/wp-content/themes/one-theme/css/<?php echo ot_get_color(); ?>.css ); --></style>
-
13 Febbraio 2009 alle 17:10 #62679SteveAglAmministratore del forum
credo, al posto dell’ultima riga che se intuisco bene dovrebbe caricare un file che definisce i colori del tema… da provare aovviamente…
-
13 Febbraio 2009 alle 18:00 #62685naftalinaPartecipante
vediamo se riesco grazie della tua disponibilità sempre perfetto grazie ancora
-
13 Febbraio 2009 alle 18:11 #62686naftalinaPartecipante
fatto un po di prove ma mi sballa tutto il template sicuramente sbaglio qualcosa ma non capisco
-
15 Febbraio 2009 alle 5:14 #62748naftalinaPartecipante
Fatto alcune prove ma nulla potresti dirmi il codice giusto da inserire se puoi grazie
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.