Home › Forum › Amministrazione WP › impostare (collegare) lo sfondo di wordpress in base a quello del sito
-
AutorePost
-
-
22 Novembre 2011 alle 11:00 #19836power142Partecipante
per impostare lo sfondo del mio wordpress, mi basta andare alla voce “Aspetto->Sfondo” e premere il pulsante Sfoglia, per scegliere un file immagine presente nel mio computer.
Però, invece di scegliere un file, vorrei che lo sfondo fosse “prelevato” direttamente dal mio sito, specificandone semplicemente l’indirizzo: http://www.miosito.it/sfondo.jpg
In questo modo se apporto una modifica al file “sfondo.jpg”, essa verra visualizzata automaticamente, non solo sul mio sito, ma anche in wordpress.
E’ possibile?
Si deve smanettare in qualche file?
-
22 Novembre 2011 alle 13:31 #89961SteveAglAmministratore del forum
si ma quale chissa chi lo sa… visto che manca l’informazione base.. indovina quale?
-
22 Novembre 2011 alle 13:49 #89966power142Partecipante
il tema?
Twenty Ten 1.2 di the WordPress team
-
22 Novembre 2011 alle 14:19 #89968SteveAglAmministratore del forum
DOvrebbe bastare cambiare in fucntion.php del tema (okkio che poi se lo aggiorni perdarai la modifica) la riga:
define( ‘HEADER_IMAGE’, ‘%s/images/headers/path.jpg’ );
mettendo al posto di %s/images/headers/path.jpg l’URL completa all’immagine.. da provare.. non ho avuto modo di testarla
-
22 Novembre 2011 alle 17:21 #89980power142Partecipante
funziona
-
22 Novembre 2011 alle 17:40 #89981SteveAglAmministratore del forum
Immaginavo bene… risolto
-
22 Novembre 2011 alle 17:41 #89982SteveAglAmministratore del forum
Aggiungo che se ho visto bene il codice quella costante è in un if.. in tal caso la si potrebbe predefinire in wp-config.php in maniera tale che aggiornando il tema non si perda l’impostazione
-
23 Novembre 2011 alle 20:38 #90013power142Partecipante
quindi nel file wp-config.php dovrei mettere in “qualche parte” la definizione della costante “define( ‘HEADER_IMAGE’, miaimmagine );”?
Scusate ma ancora ho poca esperienza con wp e php…
-
24 Dicembre 2011 alle 9:29 #91117power142Partecipante
purtroppo dopo l’aggiornamento alla versione successiva di wordpress, tale metodo non funziona più…
Qualche idea?
-
24 Dicembre 2011 alle 12:05 #91118SteveAglAmministratore del forum
Non capisco perchè non dovrebbe funzionare il tema usa la stessa funzione vecchia e la funzione usa la costante se definita… ovvio che se l’avevi nel file function del tema dopo l’aggiornamento si è persa…
-
24 Dicembre 2011 alle 14:38 #91120power142Partecipante
si ma l’ho rimessa, boh…
-
24 Dicembre 2011 alle 15:14 #91121SteveAglAmministratore del forum
Se devi modificare il tema a questo punto direi che puoi aprire l’header.php del tema e cercare <?php header_image(); ?> che viene assegnato ad un tag immagine e cambiarlo con la url che desiri tu.
-
24 Dicembre 2011 alle 21:30 #91126power142Partecipante
ciò modifica l’immagine dell’intestazione, non quella dello sfondo
-
25 Dicembre 2011 alle 20:21 #91133SteveAglAmministratore del forum
La costante header_image ha sempre modificato l’header.. non lo sfondo.. ergo allora qua non ci siam capiti come poteva prima funzionare ?
-
26 Dicembre 2011 alle 10:51 #91142power142Partecipante
eppure funzionava.
Voglio solo che l’immagine di sfondo venga prelevata direttamente dal mio sito, non da un file sul mio pc.
Cosa non è chiaro?
Rileggi il post iniziare…
-
26 Dicembre 2011 alle 13:15 #91143TittiModeratore
Se si tratta solo di pescare l’immagine da una cartella basta aggiungere nel foglio stile:
body {background-image: url(/wp-content/uploads/2011/12/nomeimmagine.jpg);}
-
26 Dicembre 2011 alle 14:49 #91145power142Partecipante
niente da fare.
So solo che inizialmente mi è stato suggerito di cercare la riga
define( ‘HEADER_IMAGE’, ‘%s/images/headers/path.jpg’ );
e di sostituire ‘%s/images/headers/path.jpg’ con l’immagine desiderata, ad esempio:
‘http://wwww.sito.it/test.jpg’
Solo che adesso questo sistema non funziona più.
Peraltro state tirando fuori anche metodi “alternativi” per cui inizio a capirci poco…
-
26 Dicembre 2011 alle 16:47 #91146TittiModeratore
Aggiorna il Twenty Ten alla 1.3
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.