Home › Forum › Problemi Vari con WP › Foto in pagina autore
-
AutorePost
-
-
12 Settembre 2008 alle 12:55 #7864nigredoPartecipante
Giorno a tutti…
ho necessità di creare una pagina autore che, al di sopra dell’elenco di post dello stesso, mi visualizzi la sua foto.
Ho provato con questo codice:
/autori/<?php the_author_login(); ?>.jpg” alt=”author image” />
ma l’immagine non viene visualizzata. Se controllo il riquadro dove dovrebbe comparire l’immagine, il percorso risulta giusto, tuttavia non viene aggiunto il nome della foto in fondo alla stringa. Come posso fare?
Grassie!
-
12 Settembre 2008 alle 12:57 #57637nigredoPartecipante
Ehm…devo aver sbagliato qualcosa… riprovo ad inserire la porzione di codice:
< img src=”<?php bloginfo(‘template_url’); ?>/autori/<?php the_author_login(); ?>.jpg” alt=”author image” />
-
12 Settembre 2008 alle 13:06 #57638wollyAmministratore del forum
-
12 Settembre 2008 alle 13:08 #57639wollyAmministratore del forum
importantissimo deve essere sempre all’interno del loop
-
12 Settembre 2008 alle 13:19 #57640nigredoPartecipante
Ti ringrazio Wolly…ma purtroppo non ho risolto il problema. Lo script che mi hai indicato è del tutto simile al mio e già sapevo che all’interno del loop funzionava.
Ma in quel caso la foto viene ripetuta di fianco ad ognuno dei post archiviati.
A me serve che appaia una sola immagine, in alto, corrispondente all’autore dei post sottostanti.
-
12 Settembre 2008 alle 13:22 #57641wollyAmministratore del forum
allora devi creare una pagina per ogni autore e mettere il link direttamente.
-
12 Settembre 2008 alle 13:26 #57642wollyAmministratore del forum
-
12 Settembre 2008 alle 13:26 #57643nigredoPartecipante
Ah…ok, speravo esistesse una soluzione “dinamica”, perchè gli autori si aggiungeranno nel tempo e non volevo dover gestire io la cosa. Ma se non c’è altra soluzione farò in questo modo. Grazie ancora
-
12 Settembre 2008 alle 13:29 #57645wollyAmministratore del forum
puoi sempre utilizzare un ciclo if e far stampare l’immagine solo con il primo post.
-
12 Settembre 2008 alle 13:36 #57646nigredoPartecipante
ehm…purtroppo al momento lavoro più che altro di “copia/incolla”, quindi se hai un esempio da linkarmi mi faresti un grosso favore…
-
12 Settembre 2008 alle 13:55 #57647wollyAmministratore del forum
-
16 Settembre 2008 alle 21:04 #57821wollyAmministratore del forum
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.