Home › Forum › Problemi Vari con WP › provo a inserire un’ immagine nella sidebar ma…
-
AutorePost
-
-
21 Febbraio 2007 alle 13:48 #3262ilcrisePartecipante
Inizialmente ho provato a inserire un’immagine nella sidebar tramite questa porzione di codice
<li><h2></h2>
<ul>
<li>
<img src="percorso/immagine" alt="Immagine.jpg" title="tuo testo descrizione" />
</li>
</ul>
</li>
però succedeva che alcuni browser come safari la visualizzavano, altri come Explorer per niente,
ho dunque provato con questo percorso assoluto per l’ immagine cosଠda “ancorarla”
<h2><img src="<?php bloginfo('siteurl');?>/percorso/Immagine.jpg" /></h2>
ho provato a inserirlo nel sidebar.php, ma non funziona.
Qualcuno sa dirmi dove devo inserirlo? nel foglio di stile? oppure dove?
La stringa è correttamente scritta?
Grazie in anticipo,
Paolo
-
21 Febbraio 2007 alle 14:40 #43579FreeplePartecipante
Ciao ilcrise!
Prova con:
<img src="<?php bloginfo('template_url'); ?>/..." alt=""/ >
Fammi sapere, ciao!
-
21 Febbraio 2007 alle 19:19 #43580ilcrisePartecipante
ma dove devo inserirla?
se provo in sidebar.php non succede nulla, o meglio, visualizza nella home page un quadratino blu con un punto interrogativo….
ma cosଠva bene?
<img src="<php bloginfo('template_url'); ?>/file://user/documenti/immagine.jpg" alt=" "/>
oppure devo fare in altro modo?
grazie ancora…
-
21 Febbraio 2007 alle 21:05 #43581ondapiPartecipante
oltre al percorso prova ad inserire anche le dimensioni width= height=
il percorso può essere relativo o assoluto io preferisco sempre il relativo, sidebar.php fa parte di index.php della cartella radice e non nella cartella del tema grafico
-
22 Febbraio 2007 alle 2:00 #43587ilcrisePartecipante
grazie ragazzi, ma niente…
non riesco a inserire un’immagine nella sidebar, non voglio crederci ma è cosà¬.
Le ho provate tutte. So che c’è una differenza tra percorso relativo e assoluto, ma non sono nemmeno sicuro che le stringhe che ho siano corrette…
Ho provato a inserirle, in un modo o nell’altro – è il caso di dirlo – sia in sidebar.php della veste grafica, sia in wp-content/theme/default/sidebar.php. Ancora niente.
Ma proprio nessuno mi può aiutare?
vorrei solo un disegnino nella homepage…
-
22 Febbraio 2007 alle 8:03 #43589SteveAglAmministratore del forum
<img><php bloginfo('template_url'); ?>/file://user/documenti/immagine.jpg" alt=" "/>
Con questo percorso non funzionerà mai… il percorso dopo <php bloginfo(‘template_url’); ?> dovrà essere quello dell’immagine relativamente alla directory principale di wordpress.
-
22 Febbraio 2007 alle 17:00 #43600ondapiPartecipante
prova cosà¬:
metti nella sidebar questo
e carica ilnomedelfile.jpg nella cartella del blog dove c’è il file config.php non in quella del tema default
ciao
-
23 Febbraio 2007 alle 7:37 #43609ondapiPartecipante
riformulo la risposta probabilmente non si è copiato il codice
prova cosà¬:
metti nella sidebar questo
<img src="http://www.wpitaly.it/wp-content/banner/wp_6.png" width="80" height="15" alt="WP" border=0>
che altro non è il link ad una simpatica immagine di wp
funziona?
se si modifica il percorso
oppure metti
<img src="wp_6.png" width="80" height="15" alt="WP" border=0>
ma in questo caso devi caricare l’immagine wp_6.png nel tuo server nella cartella del blog dove c’è il file config.php non in quella del tema default
tieni sempre una copia di wp in localhost dove puoi sperimentare
ciao
-
23 Febbraio 2007 alle 13:04 #43616ilcrisePartecipante
finalmente comincio a capirci qualcosa…
resta il problema che non tutti i browser visualizzano l’immagine correttamente. L’immagine che mi hai consigliato di mettere, con questa stringa:
<img src="http://www.wpitaly.it/wp-content/banner/wp_6.png" width="80" height="15" alt="WP" border=0>
la visualizzano correttamente tutti i browser,
può darsi allora che il mio problema dipenda dal fatto che l’immagine che intendo visualizzare non sia contenuta nella cartella wp-content.
come faccio, allora, a caricare un’immagine in quella cartella? Oppure il fil config.php?
dove li trovo?
-
23 Febbraio 2007 alle 15:17 #43623ondapiPartecipante
caro Crise il logo di wp che hai inserito proviene da un link esterno al tuo sito
se vuoi inserire il logo da un’immagine che si trova nel server devi caricare l’immagine nel server
dove hai messo wp nella cartella ilcrise se apri quella cartella in ftp vedrai dei file (index.php, wp-login.php …) e delle cartelle (wp-admin, wp-content …) se carichi li dentro il logo lo richiami
<img src="logo.jpg" width="xx" height="xx" alt="logo" border=0>
se invece crei una nuova cartella dove mettere le varie immagini e banner e la chiami per esempio immagini e vi inserisci il logo, allora lo richiami cosà¬
<img src="immagini/logo.jpg" width="xx" height="xx" alt="logo" border=0>
-
23 Febbraio 2007 alle 20:13 #43627ilcrisePartecipante
ho risolto ragazzi!
non ci posso credere….
ho caricato l’immagine nella cartella wp-content nel file manager del mio host e da lଠho richiamato il link con l’ultima stringa che mi avete sggerito!
grazie ancora!!!!!
a tutti…
paolo
-
22 Febbraio 2008 alle 13:54 #50947ciopin183Partecipante
Ciao Ragazzi,
sono nuovo del mondo WORDPRESS ma devo dire che ne sono affascinato. Mi fa piacere vedere che esiste una comunity cosଠviva e partecipe. Io ho lo stessa la difficoltà di cui sopra, cioè ho problemi nell’inserire delle immagini nella sidebar. Premetto che sto lavorando sul tema blue-box-01. Navigando in rete ma anche in questo forum ho visto che è possibile farlo usando o il BLOGROLL o inserendo come WIDGEST un blocco di testo. Io ho provato in tutte e due i modi.
-Nel blogroll riesco a inserire il link ma non a visualizzare l’immagine…mispiego meglio alla voce blogroll c’è la scritta logo ma non visualizzo l’immagine però se ci clicco sopra mi apre in una pagina nuova l’immagine.
-Nel Widgest di testo, dopo aver caricato l’immagine sul servere seguendo l’opportuna procedura, inserisco l’indirizzo dove è situato il file e cioè http://www.miosito/immagini/file.gif e do l’invio…..ma niente. Nella sidebar però si vede l’ X rossa perciò credo ci siamo quasi ma non capisco dove sbaglio.
Per concludere ho provato anche ad inserire nel file style.css il comando ( ovviamnete inserendo i dati corretti) ma NULLA.
Mi aiutate a capire cosa fare e dove intervenire?!
Grazie Mille
Umberto
-
22 Febbraio 2008 alle 14:11 #50949SteveAglAmministratore del forum
Link a pagina del sito dove si presenta il problema please.
-
22 Febbraio 2008 alle 16:48 #50957ciopin183Partecipante
E’ ancora in fase di lavorazione ma lo trovi all’indirizzo
-
22 Febbraio 2008 alle 17:42 #50964SteveAglAmministratore del forum
E dove sarebbe l’immagine che non si vede?
PS: Il sito su IE si vede bene.. ma guardalo con FF perchè è tutto sballato… le modifiche van controllate una alla volta man mano che si fanno sui vari browser.
-
22 Febbraio 2008 alle 19:49 #50968ciopin183Partecipante
Hai Ragione sulle modifiche. L’ho notato solo dopo…non pensavo infatti che ci fosse differenza tra browser tant’è che ho anche aperto un post specifico per chiedere lumi.
Non trovi più la X rossa perchè nel frattempo l’ho tolta ma rimane comunque il mio non sapere come fare ad inserire l’immagine nella sidebar.
Qual’è la procedura esatta e soprattutto dove, precisamente, devo inserire nel css l’eventuale codice html?
Grazie
-
22 Febbraio 2008 alle 20:20 #50969SteveAglAmministratore del forum
Da come avevi descritto all’inizio il modo per inserire l’immagine è corretto, in fondo è solo del codice html inserito manualmente nel codice della sidebar, per questo volevo vedere dove era il problema su una pagina con l’errore effettivamente visibile, non avendo la sfera di cristallo
-
25 Febbraio 2008 alle 21:02 #51043ciopin183Partecipante
Ciao
ti rispondo solo ora perchè non ho avuto tempo prima di farlo. Ho inserito un widget di testo nel sito e copincollato il codice html seguente
ma come vedrai andando sul sito http://www.ciopin.altervista.org non visualizzo,con explorer,nient’altro che la X rossa mentre se uso firefox non vedo nulla ed è addirittura sfasata la scritta logo arci.
Ma in che parte del codice va inserito inserito il ?
#sidebar{width:230px;float:right;margin:5px;padding:0;}
.rsidebar{width:210px;color:#666;margin:0 auto;padding:0 5px;}
.rsidebar h2{font-size:14px;border-bottom:dashed 1px #ccc;margin:0 7px 3px;padding:3px 0;}
.rsidebar ul{list-style-type:none;margin:0;padding:0;}
.rsidebar ul li{list-style-type:none;margin:0 0 10px;padding:0;}
.rsidebar ul li ul{list-style-type:square;margin:0;padding:0 3px;}
.rsidebar ul li ul li{list-style-type:none;background:transparent url(images/b.gif) no-repeat 0 4px;border:0;margin:0;padding:0 0 2px 14px;}
#footer{width:790px;background-color:#e91428;height:30px;line-height:30px;clear:both;color:#fff;margin:0;padding:0 0 0 10px;}
a:visited{text-decoration:none;color:#069;border:none;}
a:hover{text-decoration:underline;color:#69c;border:none;}
#wp-calendar #prev a,#wp-calendar #next a{font-size:9pt;}
#wp-calendar a{text-decoration:none;display:block;}
#wp-calendar caption{font:bold 1.3em ‘Lucida Grande’, Verdana, Arial, Sans-Serif;text-align:left;width:100%;}
#wp-calendar th{font-style:normal;text-transform:capitalize;}
#wp-calendar{empty-cells:show;width:100%;margin:10px auto 0;}
#wp-calendar #next a{padding-right:10px;text-align:right;}
#wp-calendar #prev a{padding-left:10px;text-align:left;}
#wp-calendar td{text-align:center;padding:3px 0;}
#wp-calendar td.pad:hover{background-color:#fff;}
a:link,a:active{text-decoration:none;color:#14568a;border:none;}
.navigation{width:520px;float:left;color:#666;}
.alignright{float:right;margin-top:10px;}
.alignleft{float:left;margin-top:10px;}
.space{background:#fff;height:5px;clear:both;margin:0 auto;padding:0;}
#searchform{height:26px;line-height:26px;float:left;margin:0;padding:0 0 10px;}
input#s{color:#5188d2;width:140px;border:1px solid #cbcbcb;background:#fcfcfc;}
input#searchsubmit{background:#4879aa;color:#fff;font-size:13px;border:1px #2f5c89 solid;}
.bobcomments{border-top:5px solid #006394;background:#fbfbf9;border-bottom:1px solid #006394;margin-bottom:20px;}
-
25 Febbraio 2008 alle 21:05 #51044ciopin183Partecipante
Il codice inserito era < img src=”immagini/logo.jpg” alt=”logo” >
scusa ma ho inserito il codice esatto e anche qui c’è la fantomatica X rossa.
-
25 Febbraio 2008 alle 22:32 #51047silvanaPartecipante
>div class=”textwidget”< >p align=”center”< >img src=”http://www.ciopin.altervista.org/logarci.gif”< >/p< >/div<
controlla che sia chiuso il div
cosଠdovrebbe funzionare
chiaramente inverti ><
-
26 Febbraio 2008 alle 13:31 #51066ciopin183Partecipante
Prima di tutto grazie per avermi risposto.
Ho provato ad inserire il tuo codice
>div class=”textwidget”< >p align=”center”< >img src=”http://www.ciopin.altervista.org/logarci.gif”< >/p< >/div<
invertendo >< ma non è cambiato nulla! Se vai sul sito http://www.ciopin.altervista.org vedrai che compare sempre la X rossa, se lo apri con explorer, mentre si vede solo la scritta se lo apri con firefox.
Non penso dipenda da dove lo inserisco vero? Io ho provato ad inserire il codice di cui sopra quà¬
#sidebar{width:230px;float:right;margin:5px;padding:0;}
.rsidebar{width:210px;color:#666;margin:0 auto;padding:0 5px;}
.rsidebar h2{font-size:14px;border-bottom:dashed 1px #ccc;margin:0 7px 3px;padding:3px 0;}
.rsidebar ul{list-style-type:none;margin:0;padding:0;}
.rsidebar ul li{list-style-type:none;margin:0 0 10px;padding:0;}
.rsidebar ul li ul{list-style-type:square;margin:0;padding:0 3px;}
.rsidebar ul li ul li{list-style-type:none;background:transparent url(b.gif) no-repeat 0 4px;border:0;margin:0;padding:0 0 2px 14px;}
<div class=”textwidget”> <p align=”center”> </p> </div>
#footer{width:790px;background-color:#e91428;height:30px;line-height:30px;clear:both;color:#fff;margin:0;padding:0 0 0 10px;}
Comincio a scoraggiarmi…SOB SOB!
-
26 Febbraio 2008 alle 17:08 #51083silvanaPartecipante
no (pensavo fosse sottointeso) il codice va inserito nella sidebar.php
non nel css, nel punto esatto dopo il richiamo al search
-
26 Febbraio 2008 alle 17:49 #51087ciopin183Partecipante
Alla fine ci sono riuscito….grazie mille!
Inizialmente inserivo il codice in style.css ma dopo ho capito che bisognava metterlo in rsidebar.php.
Ho inserito questo frammento di codice html [img src=”http://www.ciopin.altervista.org/logarci.gif” VSPACE=”30″ HSPACE=”40″ width=”118″ height=”120″ alt=”WP” border=0]ovviamnete inseremto all’inizio ed alla fine <>.
Però mi rimane da risolvere un problema: Firefox visualizza l’immagine perfettamente Explorer no ma non solo, non mi visualizza più nemmeno il calendario e il motore di ricerca interno…vedere per credere http://www.ciopin.altervista.org. Come mai?Grazie Ancora Umberto
[/img]
-
26 Febbraio 2008 alle 20:15 #51097silvanaPartecipante
difatti c’è una cosa strana..se guardi il codice creato su explorer all’interno della sidebar c’è il primo post
direi di controllare bene il php oltre non saprei dirti
-
1 Maggio 2009 alle 0:25 #65003lucianocrimiPartecipante
Io sinceramente non ho capito na mazza.
Ma è possibile che per inserire un link ad immagine nella sidebar bisogna fare tutto sto casino?
Non esiste un plugin adatto?
Io al posto del classico link testuale vorrei inserire delle immagini piccole cliccabili.
-
1 Maggio 2009 alle 14:31 #65016degraPartecipante
Le inserisci come quasiasi immagine in una pagina html qualunque, linkandole a ciò che vuoi.
Però se rispondi ad una discussione vecchia di un anno, senza esempi, non è che ti si possa aiutare…
-
2 Maggio 2009 alle 20:23 #65040LvcanvsPartecipante
Degra ha ragione, specialmente sulla vecchiaia della discussiomne Un metodo veloce è inserirle in un widget di testo… carichi le immagini in un articolo (cosଠfaccio io di solito) e copi il codice nel widget. E poi cancelli l’articolo.
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.