Home › Forum › Problemi Vari con WP › Pagina nascosta al menu
-
AutorePost
-
-
5 Marzo 2009 alle 15:37 #9707StefanoNPartecipante
Salve,
é possibile rendere una pagina non visibile nel menu,
ma ad esempio richiamabile tramite un link presente in un widget?
In pratica una pagina nascosta,
ciao
grazie
-
5 Marzo 2009 alle 16:15 #63446Q-designPartecipante
per escludere una pagina dal menu, utilizza l’opzione exclude nel tag wp_list_pages.
Dopo exclude devi inserire gli ID delle pagine da escludere.
wp _list _pages(‘exclude=5,9,23 & title_li=< h2 >’ . __(‘Menu’) . ‘</ h2 >’ ); ?>
P.S.: togli gli spazi dalla riga sopra
-
5 Marzo 2009 alle 16:17 #63449Q-designPartecipante
ti consiglio di leggere approfonditamente il Wiki di WordPress Italia:
-
5 Marzo 2009 alle 16:21 #63450StefanoNPartecipante
Scusatemi,
sono un pò all’inizio,
WP però mi piace molto
grazie mille
per la risposta
-
5 Marzo 2009 alle 17:15 #63457StefanoNPartecipante
Niente,
non capisco.
Cioè ho inserito il tag (di cui sopra) nel file header del tema,
con il numero id della pagina da nascondere,
ma non funziona,
non so dove ho sbagliato,
ciao
grazie
-
5 Marzo 2009 alle 17:18 #63459SteveAglAmministratore del forum
Mi incolli il codice PHP che hai messo? Ah ovviamente sei certoc he escludi un ID che è una pagina vero?
-
5 Marzo 2009 alle 17:23 #63461StefanoNPartecipante
Ho messo questo codice:
<?php wp_list_pages(‘exclude=317&title_li=<h2>’. __(‘Pages’) .'</h2>’); ?>
sotto questo codice:
<?php wp_list_pages(‘sort_column=menu_order&title_li=’); ?>
presente nell’header del tema
-
5 Marzo 2009 alle 17:31 #63462SteveAglAmministratore del forum
e quindi hai due elenchi di pagine?
-
5 Marzo 2009 alle 17:34 #63465StefanoNPartecipante
si, è vero
devo togliere quindi il primo codice?
-
5 Marzo 2009 alle 17:44 #63469SteveAglAmministratore del forum
e nella pria lista non appare la pagina che volevi nascondere suppongo.. ovviamente devi avere UNA sola riga.. che io farei cosà¬:
<?php wp_list_pages(‘exclude=317&sort_column=menu_order&title_li=’); ?>
-
5 Marzo 2009 alle 17:48 #63470StefanoNPartecipante
Grandissimmo,
funziona perfettamente,
grazie mille davvero!
-
5 Marzo 2009 alle 18:07 #63473SteveAglAmministratore del forum
Prego
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.