Home › Forum › Problemi Vari con WP › Utilizzare le pagine come menu! Come togliere il permalink sulla pagina madre?
-
AutorePost
-
-
6 Novembre 2009 alle 13:32 #12087Ale7676Partecipante
Salve a tutti,
vi chiedo questa cosa perchè cercando in giro non ho trovato risposte ai miei interrogativi.
Vi spiego la situazione, sto creando un sito con wordpress (v 2.8.5,XP Pro,SP3) che potete visualizzare qui
Ho utilizzato le pagine per fare un menu orizzontale e come notate funziona tutto.
Il problema ora è che vorrei non fossero cliccabili o perlomeno non puntassero a nessuna pagina.
Qualcuno sa aiutarmi???
Grazie, Ale.
-
6 Novembre 2009 alle 21:50 #69329gollum1Partecipante
Bhe… non hai cercato nel forum, non è la prima volta che viene posta questa domanda, e la risposta è sempre la stessa…
guardati il wiki, nella sezione “dissezione di un tema”.
Byez
—
Gollum1
-
6 Novembre 2009 alle 22:41 #69334Ale7676Partecipante
Ciao Gollum e grazie per le indicazioni!
In realtà ho cercato su Wiky alla sezione “dissezione di un tema”. Sia nella parte relativa alle pagine che in quella dei permalink ma entrambe le ricerche sono state senza successo.
Se sai già la risposta potresti aiutarmi più in dettaglio?
Grazie, Alessandra.
-
6 Novembre 2009 alle 23:07 #69336gollum1Partecipante
Scusami, ma dopo aver visitato (velocemente) il sito, non ho capito bene cosa vuoi che non sia cliccabile, se ho interpretato giusto, tu non vuoi che sia cliccabile il titolo della pagina, una volta che sei nella pagina stessa…
se è cosଠil file che devi modificare è page.php (o index.php se non esiste page.php).
in questo file devi semplicemente trovare dove viene creato il titolo (che è una funzione wordpress in php), se noti intorno al codice che genera il titolo, c’é il codice che genera il link.
togli questo, ed eventualmente aggiusta il css.
Byez
—
Gollum1
-
6 Novembre 2009 alle 23:18 #69338Ale7676Partecipante
Io non voglio togliere il link dall’interno della pagina….quello lo ho già fatto!
Voglio togliere il link dalla pagina principale che poi crea il menu…
esempio:
Questo è il mio menu
LE ATTIVITA (pagina madre)
CENTRI SURFSKI (pagina figlia)
I CORSI (pagina figlia)
TEAM (pagina figlia)
io ho un permalink sia sulla pagina madre che sulle figlie!
Devo eliminare il permalink sulla pagina madre.
Capito ora? Sai se si può fare in qualche modo?
Arigrazie, Alessandra.
-
6 Novembre 2009 alle 23:55 #69339gollum1Partecipante
forse ho capito, praticamente vuoi che il primo livello di menù non sia cliccabile, ma che lo siano solo i menù a discesa (esclusi quelli che non hanno pagine figlie presumo)…
credo che ci siano diverse soluzioni:
1) la più semplice: usare un plugin per generare il menù, come menubar, che è molto personalizzabile e molto versatile.
2) se vuoi mantenere il tuo menù con la tua costruzione, bisognerebbe vedere il codice che hai usato.
se hai usato esclusivamente il css per costruire il modo in cui si visualizza a livelli, credo che non ci sia modo di renderlo non cliccabile. Anche facendo uso di classi diverse, ma se usi una unica chiamata della funzione di wp per generare l’elenco delle pagine, non credo che sia possibile.
poi sicuramente arrivarà qualcuno che mi sbugiarda (lo spero per te).
Byez
—
Gollum1
-
12 Febbraio 2010 alle 16:32 #71379duraPartecipante
Ciao, Ho il tuo stesso problema, hai poi risolto?
-
16 Dicembre 2010 alle 19:01 #79661wolfeneyePartecipante
Esatto, ho anch’io questa richiesta da fare. Non si può maneggiare il file pages.php perchè cosଠavrebbe effetto su TUTTE le pagine e noi vogliamo che sia selettiva (e magari anche che sia possibile fare sta modifica sul child theme ahah).
Se voleste farci la grazia oh voi sapienti
-
6 Gennaio 2011 alle 14:59 #80077LvcanvsPartecipante
Ciao,
mi aggrego a questa discussione senza aprirne una nuova (spero nessuno si offenda). Sto provando anche io a cercare una soluzione per avere un menù orizzontale in cui alcune pagine hanno delle pagine figlie e nel quale le pagine madri NON siano cliccabili ma servono solamente per apire il dropdown con le pagine figlie.
Utilizzo il tema Twenty-Ten (che tra parentesi trovo davvero bello ed è la seconda volta che tiro su un sito con questo tema) con WP 3.0.4. Mi ritrovo su Tophost (anche se ai fini della problematica può essere una informazione superflua).
Ciò che sbaglio è il metodo di ricerca, sto provando a cercare in giro soluzioni tipo “exclude click from mother/father page”, “disable click from page”, “disable permalink from page” etc. con tutte le varianti possibili.
La repository di WP.org ed il codex non mi sono stati di grande aiuto… potete riuscire voi?
Me lo auguro e, per ora, vi ringrazio del supporto.
-
8 Gennaio 2011 alle 17:52 #80135LvcanvsPartecipante
Dunque, ho trovato la soluzione per chi utilizza il tema Twenty-Ten.
La descrivo brevemente. Innanzi tutto nel tema 20-10 è definita una funzione che utilizza il menù di default SE non viene creato nessun menù aggiuntivo (dal backend del sito). In caso si crei un nuovo menù (e che questo venga assegnato come menù di navigazione principale) quest’ultimo andrà a sostituire quello di default. Per questo passaggio chiedo ai più esperti se è una peculiarità di 20-10 o è valevole per altri temi.
Ad ogni modo, creare il menù tale e quale a quello originario con la differenza che al posto delle pagione “madri” occorre inserire un “Link Personalizzato” in cui lasciare vuoto il campo URL ed inserire il nome della pagina madre nel campo “Etichetta di navigazione”. Basta poi collegare a questo link personalizzato le pagine figlie (drag and drop, pagine figlie leggermente spostate a destra), ed il menù apparirà con la pagina madre NON cliccabile.
Ciao
-
31 Marzo 2012 alle 13:32 #94693LixPartecipante
Dunque, ho trovato la soluzione per chi utilizza il tema Twenty-Ten.
Scusate, mi intrometo anche io che fino a quando non mi sono imbattuto nella discussione avevo lo stesso problema.
La soluzione indicata da Lvcanvs funziona alla grande non soltanto col tema Twenty-Ten, ma, almeno, anche col mio tema personalizzato e autoprodotto (lo vedete qui)
Gloria sine die dunque a Lvcanvs
Ciao
Lix
-
31 Marzo 2012 alle 17:45 #94696LvcanvsPartecipante
Gratias!
Lvcanvs scrive poco sul forum ma legge sempre!
Felice di esserti stato di aiuto!
Ave.
-
24 Gennaio 2013 alle 10:46 #100654silviatagliaferri123Partecipante
Grazie semplice soluziona e funziona benissimo anche con il mio tema Graphene!!
Thankyou
-
24 Gennaio 2013 alle 14:03 #100657elmaniseroPartecipante
Per chi usa wp_list_pages e non il menu personalizzato uno strumento è l’uso del javascript da inserire nell’header, dove in questo esempio 10, 14 e 15 sono gli id delle pagine
<script type=”text/javascript”>
jQuery(function($) {
$(“li.page-item-10,li.page-item-14,li.page-item-15”).children(“a”).attr(‘href’, “javascript:void(0)”);
});
</script>
-
25 Gennaio 2013 alle 10:14 #100693federicolucchiniPartecipante
Ottima la soluzione di Lvcanvs che sto usando anch’io. Occhio però: con il template che ho scelto bisogna prima creare un link personalizzato con un link reale qualsiasi (tipo google.it) e aggiungerlo al menù (altrimenti nel mio caso non ti fa aggiungere nulla). POI editare il link che ora è nel menù e da lଠtogliere il link a google.it.
-
25 Gennaio 2013 alle 10:35 #100694TittiModeratore
àˆ cosଠcon tutti i template (il topic è vecchio), senza mettere un URL non te lo fa portare di là .
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.