Risposte nei forum create
-
AutorePost
-
zocPartecipante
Ciao Wolly,
e grazie per la risposta.
Sono entrato nel pannello media e sono andato a modificare l’immagine, ma non ho trovato nulla che mi permetta di scollegare l’immagine al post.
Inoltre ho visto che se l’immagine è inserita in più post, nel pannello media è segnalata come “collegata” a un solo post.
Infatti nel database ho visto che i post type “attachment” hanno un valore per post_parent… e se la stessa immagine è usata per più articoli, non vengono aggiunte relazioni nel database, ma solo il codice html dell’immagine all’interno dei vari articoli.
La cosa che crea problemi con la query he ho scritto sopra è che se si cancella un’immagine dal proprio articolo questo non viene aggiornato nel record del attachment.
Quindi meglio cambiare strada e mi chiedo se è possibile, in recupero dati ( the_content()), intervenire sui tag img e levare le dimensioni e aggiungergli una classe.
Grazie mille!
zocPartecipanteil mio problema è che su aruba queste funzioni non sono abilitate e in locale si:
passthru() enabled.
system() enabled.
exec() enabled.
Sapete come ovviare? non penso che aruba cambi i settaggi su richiesta.
PS: mentre per il htaccess te lo mette come htaccess.txt nella cartella del plugin. Lo fa per fartelo vedere anche su una cartella normale.
Bisogna rinominarlo .htaccess e metterlo nella cartella dei backup del db.
zocPartecipanteio sicuramente non sono un esperto, ma che tu non capisca l’utilità di avere percorsi relativi in fase di sviluppo del tuo tema, cosଠcome nel prodotto finale… mi lascia perplesso.
Fa nulla, grazie lo stesso.
zocPartecipanteaprine u qualcuno e guarda no? non mi pare difficile…
se non lo fosse non farei la domanda
Provo a porre la domanda in maniera diversa.
Dentro la directory del mio server in locale ho diversi siti.
Lo so che se mettessi la mia cartella images nella root funzionerebbe, ma non posso perchè come dicevo ho diversi siti.
Cè un modo per dire a wp che la directory root è http://localhost:8888/wordpress/ e non http://localhost:8888/?
grazie
zocPartecipantenon funziona
voi come la risolvete la cosa nei vostri temi?
grazie!
zocPartecipanteforse ho un altra soliuzione.
Ovvero visto che sto lavorando in locale e nella root principale del server ho diversi siti, allora gli cambio il path, che penso si faccia da wp-config.php, ovvero:
/** Path assoluto alla directory di WordPress. */
if ( !defined(‘ABSPATH’) )
define(‘ABSPATH’, dirname(__FILE__) . ‘/’);
giusto?
grazie!
zocPartecipantequindi è corretto utilizzare bloginfo(‘template_url’); oppure funziona si, ma non è da manuale di WP?
grazie!
zocPartecipanteforse mi sono espresso male… la cartella images sopracitata è presente all’interno della mia directory del tema:
installazioneWP > wp-content > themes > mioThema > images.
So bene che cosa è bloginfo(‘template_url’); e sto usando quello perchè il percorso relativo (images/miaimmagine.png) non mi funziona e volevo capire perchè
zocPartecipantenel senso che se metto
src="/images/foto.png" />
non mi visualizza l’immagine, mentre se metto
src=<?=bloginfo('template_url');?>/images/foto.png" />
me lavisualizza.
Ma penso ci sia qualcosa di sbagliato, perchè anche la prima mi dovrebbe andare, no?
Grazie!
-
AutorePost