Home › Forum › Plugin e temi di WP › Come modificare questo tema?
-
AutorePost
-
-
12 Agosto 2010 alle 5:53 #14725navigarwebPartecipante
Salve,
ho un sito in wordpress ancora sotto manutenzione, e passato da piattaforma blogger.
Il tema l’ho scaricato gratuitamente.
Potete vedere questa pagina per capire quello che cerco: (www. unafinestrasulweb.it/privacy-disclaimer)
Quello che vorrei modificare è il menu orizzontale delle categorie (applicaizoni online, divertente, ecc ecc ecc)
Sono caytegorie create automaticamente. Più che altro, vorrei scegliere quali lasciare lଠin alto,o se addiruittura togliere del tutto tale menu.
Ho provato con firebug a cercare il codice relativo, ma quando entro in wordpress per modificare il tema, non mi riesce trovare da che parte si trovi tale codice.
Chi sa darmi qualche dritta?
Grazie
-
12 Agosto 2010 alle 6:20 #76138PaperPartecipante
Per queste cose i metodi sono sempre i soliti:
1) invece che scegliere il tema solo per l’estetica, sceglierlo anche per le funzionalità .. sono diversi i temi free che hanno delle opzioni interne per modificare i menu e tutto il resto con un paio di click… tra cui l’esclusione di alcune categorie dal menu, o la completa disattivazione del menu stesso, ecc.
2) trovare dei plugin che fanno quello di cui hai bisogno con una ricerchina nella sezione extend del sito wp.. come in un topic recente si parlava di un plugin che permette di escludere determinate pagine dai menu, dovrebbe esserci quello analogo che fa la stessa cosa per le categorie.
3) andare a modificare manualmente il tema, specificando quali categorie escludere.. o togliendo proprio la funzione del menu ecc. di norma il codice dei menu come quello del sito che hai linkato sono all’interno del file header, poi ogni tema è fatto a modo suo
-
12 Agosto 2010 alle 7:29 #76139navigarwebPartecipante
Grazie Paper per la risposta.
In effetti ho guardato anche alla funzionalità del tema in oggetto, prima di scaricarlo. Ma non avevo notato quel menù di categorie orizzontali.
Ma più che altro, nell’importare il blog da blogger, mi ha creato queste categorie (riprese dai tags) che vorrei mnodificare. Ovvero, vorrei lasciare solo alcune a scapito di altre, almeno in quella posizione. In particolare, non vorrei mostrata la categoria “Senza categoria”.
Ho guardato tutte le parti del codice, ma non essendo un esperto, non ho trovato quella relativa a questo menu.
Speravo che l଒add-on di Firefox Firebug potesse aiutarmi. Con questa estensione ho guardato il codice, ma cercandolo nel file header dentro wordpress non ho trovato quelle stringhe, e quindi non so come fare.
Se postassi qua il codice dell’header potresti aiutarmi?
-
12 Agosto 2010 alle 19:38 #76157PaperPartecipante
Bhè, partiamo dal fatto che di norma WP in quel menu inserisce le categorie che hanno post al loro interno e le visualizza in ordine alfabetico. Di conseguenza non mostra le categorie vuote (quindi ad esempio se tutti i post che ora sono in “senza categoria” li metti in categorie più adeguate, quando questa rimane vuota sparisce dal menu). Questo ovviamente a meno che il tema in uso non abbia impostazioni differenti nel template. E praticamente questa cosa è inclusa in quasi tutti i temi di wp (o quantomeno la maggior parte) e la disposizione classica è nella parte bassa dell’header, mentre in quella alta c’è un menu analogo che però mostra le pagine invece che le categorie.
Detto questo, la prima cosa che ti consiglio di fare è quella di andare nella pagina di gestione categorie e organizzarti il tutto come ti viene meglio.. quindi rinominarle se vanno rinominate, cancellarle, aggiungerne di nuove ecc… poi se c’è bisogno, riorganizzi anche i post mettendoli nelle giuste categorie (ricordandoti appunto che di default le categorie vuote non vengono visualizzate).
Ora che hai tutto organizzato, puoi “giocare” con il menu. Il fatto di organizzare il tutto prima è anche dovuto al fatto che di norma le categorie vengono gestite non con il nome, ma con il loro id, quindi se sono già impostate come si deve, imposti il template una volta sola e fine.
Ora, la scelta è sempre: lavoro a mano oppure plugin?
Di plugin sicuramente ce ne sono, ma io personalmente non saprei consigliarti, siccome non ne ho mai usati.. ho sempre gestito questa cosa dalle opzioni dei temi che includevano di loro questa funzione.
Manualmente.. come ti dicevo la norma è che il codice di entrambi i menu (pagine e categorie) sia nell’header… quindi aprendo il file header.php (a meno che nel tuo tema non abbia un nome differente) devi cercare la parte che gestisce il menu categorie.
Un buon punto di partenza è cercare wp_list_categories (analogamente, l’altro sarà alla voce wp_list_pages) e di seguito a questa voce, dovresti trovare tutti i parametri che gestiscono il menu, come l’ordine in cui vengono visualizzate (di default per nome, ma si può cambiare) se quelle vuote vengono nascoste automaticamente, ecc ecc.
Quindi modificando i valori dei singoli parametri, o aggiungendone di nuovi, dovresti riuscire a personalizzarti il menu come preferisci.
Da qui in poi, è consigliabile fare riferimento a questa pagina http://codex.wordpress.org/Template_Tags/wp_list_categories per vedere tutto quello che si può fare e come.
Tutto questo a meno che il tema non abbia delle opzioni interne per gestire i due menu in questione, nel qual caso insieme ci sarebbero altre parti di codice per gestire la cosa in automatico dalle opzioni.
-
18 Agosto 2010 alle 10:52 #76360navigarwebPartecipante
Grazie molte Paper.
Allora ho organizzato le categorie. Cosଠ“Senza Categoria” è sparito, ma nella stessa pagina adesso si vedono tutte.
Sono andato a vedere il codice dell’header.php, ma non riesco a trovare le voci che si riferiscono alla gestione delle categorie.
Posso inviare qui il codice?
Grazie ancora!
-
18 Agosto 2010 alle 11:17 #76361PaperPartecipante
Ovviamente che ora si vedano tutte è una cosa prevista, perchè di norma i temi sono impostati appunto per visualizzare tutte le categorie inserite, poi sta a noi editare il tema e dargli le indicazioni su cosa vogliamo che sia visualizzato e cosa no.
il codice potresti postarlo, a meno che non sia chilometrico, nel qual caso meglio evitare e usare altri metodi.
Comunque, ritornando a quanto ho detto nell’altra risposta, sei sicuro che nel file header non ci sia scritto da nessuna parte “wp_list_categories” (senza le virgolette ovviamente)??
Di norma tutto sta in quella voce e in quello che c’è scritto a seguire. Nel tuo caso basta che modifichi la stringa aggiungendo i vari id delle categorie che vuoi escludere dall’elenco automatico, oppure escludere completamente l’elenco e inserire solo le categorie da includere.. il tutto seguendo le indicazioni riportate al link di wp codex che ti ho fornito sopra.
-
19 Agosto 2010 alle 0:00 #76400navigarwebPartecipante
Nel file header.php non c’è davvero la stringa che mi cheidi te. Siccome non è poi cosଠlingo, te lo posto subito, cosଠci dai un’occhiata:
<?php
function kreative_wp_head() {
$kt =& get_instance();
$jquery = $kt->config->item('jquery_source', 'optimize');
if (in_array($jquery, array('cdn-google'))) :
?>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<?php
else :
?>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jquery.min.js"></script>
<?php
endif;
if ($kt->config->item('enable_cufon', 'general') == 'true') : ?>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/cufon-yui.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/vegur_400-vegur_700.font.js"></script>
<script type="text/javascript">
<!--
jQuery(function($) {
Cufon.replace('h1.maintitle, #header h1, h2.mainhead, li.t1 a, li.t2 a, li.t3 a');
});
-->
</script>
<?php endif;
}
add_action('wp_head', 'kreative_wp_head');
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.