Home › Forum › Problemi Vari con WP › Modifica template menu wordpress 3.0.1
-
AutorePost
-
-
13 Agosto 2010 alle 10:06 #14739kPartecipante
Salve a tutti, sono nuovo nel mondo di WordPress e su un giornale ho letto che si possono creare particolari tipi di menu riporto in seguito il codice che bisognerebbe inserire
<?php
/*
Registrazione di 4 menàƒÂ¹ usando le nuove funzionalitàƒÂ di WordPress 3.0
*/
add_action( ‘init’, ‘registra_menu’ );
function registra_menu() {
register_nav_menus(
array(
‘primo-menu’ => __( ‘Primo’ ),
‘secondo-menu’ => __( ‘Secondo’ ),
‘terzo’ => __( ‘Terzo’ ),
‘quarto’ => __( ‘Quarto’ )
)
);
}
e poi di inserire questa stringa per chiamare il tema
wp_nav_menu(
array( ‘container_class’ => ‘menu-header’,
‘theme_location’ => ‘secondo’,
‘depht => ‘0’)
);
La prima domanda e dove vanno inseriti queste stringhe nel tema “Twenty Ten 1.1 di the WordPress team”
e vorrei sapere se c’è qualche errore o qualcosa da modificare.
L’artico per chi è interessato l’ho preso da IoProgrammo di Agosto 2010
-
13 Agosto 2010 alle 10:10 #76190PaperPartecipante
parere personalissimo mio… forse ti conviene spiegare cosa vuoi fare tu.. quale risultato vuoi ottenere.. e magari trovi chi ti spiega come farlo nel modo più semplice e indolore.
-
13 Agosto 2010 alle 10:19 #76192wollyAmministratore del forum
twenty ten ha già questa funzionalità attivata.
-
13 Agosto 2010 alle 10:23 #76193kPartecipante
Vorrei creare più menu dove come contenuto abbiano categorie, link, pagine infatti il pezzo di codice sopra dovrebbe servire a modificare la posizione dei temi e sostituire Il tema supporta il menu 1 . Selezionare quale menu utilizzare.
con Il tema supporta il menu 4 . Selezionare quale menu utilizzare.
di modo tale che possa creare quanti menù voglio e metterci quello che voglio. in questo caso quattro.
-
13 Agosto 2010 alle 10:43 #76194PaperPartecipante
bhè, ma teoricamente, puoi farlo dalle impostazioni.. sia gestendo il menu principale del tema, sia aggiungendo menu personalizzati (c’è la funzione apposita). Poi ad esempio, se vuoi visualizzare tutto nella sidebar, per i link puoi usare l’apposito widget e cosଠvia. Una volta che hai tutti i widget impostati come li vuoi tu, li muovi nell’apposito menu e li ordini nella sidebar come meglio preferisci.
-
13 Agosto 2010 alle 10:44 #76195wollyAmministratore del forum
se vuoi semplicemente mettere il tuo menu personalizzato al posto di quello che c’è ora basta che vai in aspetto -> menu e lo crei e poi gli dici di metterlo al posto di quello standard, se invece devi mettere 4 menu o modifichi il tema o usi il widget dei menu per posizionarli nella sidebar e/o nel footer.
-
13 Agosto 2010 alle 13:11 #76202kPartecipante
Se io invece volessi metterlo in alto e in orizzontale i mie menu, come dovrei fare?
-
13 Agosto 2010 alle 13:33 #76207wollyAmministratore del forum
modificando header.php spostndo la chiamata al meniu, a questo punto ti suggerisco la lettura di dissezione di un tema nel wiki per comincire a comprendere come funzionano i temi di wp.
-
13 Agosto 2010 alle 14:43 #76212kPartecipante
vedo e dopo guardo se riesco a concludere
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.