Home › Forum › Problemi Vari con WP › rimuovere link dai titoli delle pagine
-
AutorePost
-
-
18 Marzo 2014 alle 19:29 #26893tenebra87Partecipante
Ciao a tutti…sto impazzendo!! Ho cercato anche su google ma non riesco a capire come poter togliere i link ai titoli delle pagine. Vorrei che rimanesse il titolo della pagina ma che non sia cliccabile e rimandi alla stessa pagina.
Qualcuno sa gentilmente aiutarmi?
Sto usando wp 3.8.1 e tema Simple Catch.
Grazie mille!
Luca
-
18 Marzo 2014 alle 19:40 #110520TittiModeratore
Vorrei che rimanesse il titolo della pagina ma che non sia cliccabile e rimandi alla stessa pagina.
Cioè?
-
18 Marzo 2014 alle 20:18 #110521tenebra87Partecipante
Il titolo della pagina cambia colore se ci passo sopra con il mouse e se lo si clicca viene ricaricata la stessa pagina.
Voglio eliminare il link legato al titolo
-
18 Marzo 2014 alle 21:16 #110522TittiModeratore
Ah OK… ma che non sia cliccabile e non rimandi alla stessa pagina, avevi dimenticato un “non”.
Per togliere la cliccabilità devi eliminare il tag < a href> < /a> che racchiude the_title.
Ad es., se stai parlando di pagine nel file troverai più o meno
< a href="<?php the_permalink()" /> <?php the_title()?> < /a>
Dovrai prima creare un child theme per non perdere le modifiche quando aggiornerai il tema.
Leggi qui per imparare a lavorare con i temi.
-
18 Marzo 2014 alle 21:19 #110523tenebra87Partecipante
Ok dopo provo. Sto già usando il child del tema.
Ti faccio sapere. Grazie.
-
19 Marzo 2014 alle 0:10 #110524tenebra87Partecipante
Ah OK… ma che non sia cliccabile e non rimandi alla stessa pagina, avevi dimenticato un “non”.
Per togliere la cliccabilità devi eliminare il tag < a href> < /a> che racchiude the_title.
Ad es., se stai parlando di pagine nel file troverai più o meno
< a href="<?php the_permalink()" /> <?php the_title()?> < /a>
Dovrai prima creare un child theme per non perdere le modifiche quando aggiornerai il tema.
Leggi qui per imparare a lavorare con i temi.
ho provato come dici te ma non cambia nulla. Ho provato a mettere
h2 {display: none;}
e a inserire a mano i titoli (dando formattazione titolo1) ma facendo cosଠperò mi sparisce la descrizione del sito. Come mai?
Grazie
-
19 Marzo 2014 alle 11:20 #110526TittiModeratore
Oltre a leggere quel link che ti ho già dato, ti farebbe bene leggere anche la base della base dell’HTML, il collegamento ipertestuale.
Le altre cose non so come ti siano venute in mente, ma sono sbagliate e non è quello che ti ho detto di fare.
Al limite, se proprio non sai cosa togliere, copia incolla su pastebin il pezzo di codice del file che vorresti cambiare e metti qui il link, invece che fare cose che non c’entrano niente.
Già sapere quale pagina > quale file vorresti cambiare sarebbe qualcosa.
-
19 Marzo 2014 alle 12:09 #110529tenebra87Partecipante
Oltre a leggere quel link che ti ho già dato, ti farebbe bene leggere anche la base della base dell’HTML, il collegamento ipertestuale.
Le altre cose non so come ti siano venute in mente, ma sono sbagliate e non è quello che ti ho detto di fare.
Al limite, se proprio non sai cosa togliere, copia incolla su pastebin il pezzo di codice del file che vorresti cambiare e metti qui il link, invece che fare cose che non c’entrano niente.
Già sapere quale pagina > quale file vorresti cambiare sarebbe qualcosa.
io ho fatto come avevi detto te di togliere il tag < a href> < /a> che racchiude the_title ma non è cambiato nulla e il titolo rimaneva sempre con il collegamento. Dopo guardo questi collegamenti che mi hai dato e vedo se riesco a risolvere il problema
-
19 Marzo 2014 alle 13:16 #110531TittiModeratore
Li hai tolti dal posto (=file) sbagliato evidentemente, come dicevo devi prima individuare da dove lo vuoi togliere.
Magari se lo dicessi ti potremmo dare una mano.
-
19 Marzo 2014 alle 13:23 #110532tenebra87Partecipante
Li hai tolti dal posto (=file) sbagliato evidentemente, come dicevo devi prima individuare da dove lo vuoi togliere.
Magari se lo dicessi ti potremmo dare una mano.
l’ho tolto sia dal file content.php che da page-blog.php dove è presente il tag < a href> < /a> che racchiude the_title.
Grazie
-
19 Marzo 2014 alle 14:24 #110533TittiModeratore
Ho scaricato il tuo tema, e non sono quelli i file da cambiare, ma il simplecatch_functions.php.
Prima devi creare un file functions.php, che poi inserirai nel tuo child theme.
In questo tuo functions.php devi copiare tutta la funzione simplecatch_loop() prendendola da /wp-content/themes/simple-catch/functions/simplecatch_functions.php e la modifichi come detto sopra, cioè cambiando quella riga da cosà¬:
<h2 class=”entry-title”>< a href=”<?php the_permalink() ?>” rel=”bookmark” title=”<?php the_title(); ?>”><?php the_title(); ?>< /a></h2>
a cosà¬:
<h2 class=”entry-title”><?php the_title(); ?></h2>
Idem se vuoi togliere la stessa cosa dall’articolo singolo, più sotto.
-
19 Marzo 2014 alle 14:30 #110534tenebra87Partecipante
Ho scaricato il tuo tema, e non sono quelli i file da cambiare, ma il simplecatch_functions.php.
Prima devi creare un file functions.php, che poi inserirai nel tuo child theme.
In questo tuo functions.php devi copiare tutta la funzione simplecatch_loop() prendendola da /wp-content/themes/simple-catch/functions/simplecatch_functions.php e la modifichi come detto sopra, cioè cambiando quella riga cosà¬:
<h2 class=”entry-title”><?php the_title(); ?></h2>
Wow Grazie mille Titti!! Ti ringrazio tantissimo!! come hai fatto a capire che era quello il file?
Grazie ancora!!
-
19 Marzo 2014 alle 14:37 #110535TittiModeratore
Perché non erano né page né content, e certo non poteva essere single, archive o altri che non c’entrano con le pagine, e quand’è cosଠnon può che essere in un file functions.
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.