Home › Forum › Problemi Vari con WP › rimuovere formattazione “List” da “pages”
-
AutorePost
-
-
10 Giugno 2008 alle 16:03 #6933morfinaPartecipante
Vorrei visualizzare l’elenco delle pagine stampate nella sidebar in sequenza orrizzontale nell’header.
E’ spiegato correttamente a questo link
Solo che non capisco queste affermazioni:
“You can remove the outermost item (li.pagenav) and list (ul) by setting the title_li parameter to an empty string.”
“All list items (li) generated by wp_list_pages() are marked with the class page_item. When wp_list_pages() is called while displaying a Page, the list item for that Page is given the additional class current_page_item.”
dove dovrei intervenire per permettere a wp di stampare la lista delle pagine senza la formattazione a lista?
questo il codice presente nella sidebar : <?php wp_list_pages(‘<h2>Pages</h2>’ ); ?>
-
10 Giugno 2008 alle 18:23 #54581ondapiPartecipante
alcune informazioni le puoi trovare qui http://www.wpitaly.it/wiki/Main/WpListPages
-
10 Giugno 2008 alle 19:06 #54586morfinaPartecipante
grazie ondapi, al link da te indicato ho trovato ciò che dovrebbe permettermi di stampare i link senza intestazione e senza i tag ul li.
Il codice è il seguente: <?php wp_list_pages(‘title_li=’); ?> (praticamente setti il parametro in una stringa vuota).
Il problema è che non funziona, wp continua ad associare ai link la formattazione lista. (nella pagina wiki c’è anche un errore: si assicura di notare che dopo = non ci debbano essere spazi, quando invece nell’esempio di codice lo spazio c’è!)
-
10 Giugno 2008 alle 19:12 #54587ondapiPartecipante
è probabile che questo dipenda dal css, prova a creare una classe specifica
-
10 Giugno 2008 alle 19:30 #54589morfinaPartecipante
ma se associo una classe specifica non risulterebbe una cosa del genere:
miaclasse li <?php wp_list_pages(‘title_li=’); ?> li miaclasse
in cui ci sarebbe sempre la formattazione della lista. oppure ho capito?
-
10 Giugno 2008 alle 19:43 #54590ondapiPartecipante
la classe che hai applicato probabilmente non funziona prchè e racchiusa all’interno dell’id=sidebar
ma se non ho letto male la lista la devi visualizzare nell’header e non nella sidebar, l’elemento che dovrebbe ordinarti il tutto orrizzontalmente è {display:inline; } vado a memoria, ti conviene guardare uno dei tanti temi con menù orrizontali
alrta possibilità è utilizzare il plugin wp-menubar, che permette un ottima gestione delle pagine e volendo delle sottopagine, in più è facilmente personalizzabile tramite il suo css
-
10 Giugno 2008 alle 20:38 #54593morfinaPartecipante
trovato. posto la soluzione, magari tornerà utile…
ul.menu li {
display: inline;
margin: 0;
}
ul class=”megnu”<?php wp_list_pages(‘title_li=’); ?> /ul
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.