Home › Forum › Problemi Vari con WP › self-linking una Featured Image
-
AutorePost
-
-
26 Aprile 2012 alle 12:43 #21492kojackPartecipante
Ciao ragazzi, ho un problema con un sito!
vi descrivo la situazione allo stato dell’arte:
-nella home ho le thumbnail delle featured image dei miei post (la theme le genera automaticamente, e le linka al post stesso)
-quando clicco su una di queste thumb vengo rediretto al post stesso dove, come prima cosa, la theme mi genera nuovamente la featured image (questa volta, però, larga 620px)
-a seguire, viene mostrato il resto del post, e le immagini che contiene (ho installato una plugin fancybox per visualizzare le immagini ingrandite…)
scopro però a malincuore, che la mia featured image che viene riproposta come prima cosa all’inizio del post stesso, NON E’ CLICCABILE!!!!!
io invece vorrei che la featured image quando clickata linkasse direttamente all’originale (in maniera che questa venisse visualizzata nella fancybox di cui parlavo prima!)
non ho una grande esperienza di programmazione, ho fatto qualche modifica, ma spesso solamente rimuovendo parti di codice che facevano qualcosa che non volevo
qualcuno saprebbe aiutarmi?
Grazie mille!
-
26 Aprile 2012 alle 12:48 #95173kojackPartecipante
ah, dimenticavo!
ho individuato che la funzione che richiama la visualizzazione della featured image si trova all’interno di single.php
e in particolare recita:
the_post_thumbnail(‘col4’, array( ‘class’ => ‘feat-img’ ) );
-
28 Aprile 2012 alle 16:15 #95211enzoppiPartecipante
Hai già provato cosà¬?
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('col4', array( 'class' => 'feat-img' ) ); ?></a>
-
10 Maggio 2012 alle 7:17 #95430kojackPartecipante
ciao enzoppi, si purtroppo ho provato ma non ha funzionato
devo ammettere che non ci capisco molto di programmazione php, però ho provato a mettere quella riga in sostituzione a quella preesistente, e non mi caricava più gli articoli
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.