Visualizzazione 5 filoni di risposte
Visualizzazione 5 filoni di risposte
- Devi essere connesso per rispondere a questo topic.
Email: info@wpitaly.it
Home › Forum › Plugin e temi di WP › Usare due menu differenti sullo stesso sito
Salve a tutti,
ho una richiesta al quale non ho trovato una risposta.
Dunque: io ho il mio sito in wordpress con il suo menu e la sua homepage.
Dovrei creare una sezione del sito con un menu completamente differente da quello utilizzato dalla versione del sito base.
Come posso fare ?
Grazie a tutti per l’attenzione.
Intervenendo manualmente sul code, apri i file che ti interessano e aggiungi il menù. Non conosco il tuo intento ma per esempio vuoi inserire un menù aggiuntivo per i post di una data categoria? Allora apri il single.php ci aggiungi un conditional tag per il controllo di categoria e ci aggiungi il menù.
Non ho proprio capito cosa dovrei fare!
Qualche esempio ??
Beh e io non ho capito cosa vorresti fare, quindi siamo a cavallo
Cerco di interpretare la tua domanda. Vuoi che per esempio in homepage sia mostrato un menù e in una data categoria un menù differente?
Esatto !
Ho cercato anche in rete per vedere di trovare esempi per il codice ma non ho trovato niente di che….hai qualche consiglio ?
Thanks!
Guarda è semplice. Devi aprire il file header.php (ovviamente se il menù è nell’header) e aggiungere delle condizioni al caricamento del tuo menù.
Ovvero qualcosa del genere:
<?php if ( in_category(‘ID’)) { mostra menù1 } elseif ( in_category(‘ID’)) { mostra menù2 } else { mostra menù di default } ?>
Dando una sbirciata al codex di wp trovi tutto il necessario, variabili, esempi etc etc…..
WPItaly - Copyright Creative Commons: CC BY-NC-SA 4.0