Visualizzazione 3 filoni di risposte
Visualizzazione 3 filoni di risposte
- Devi essere connesso per rispondere a questo topic.
Email: info@wpitaly.it
Home › Forum › Problemi Vari con WP › usare php in un widget di testo?
non è proprio un problema ma qualcosa che non so come fare.
e non so se quello che voglio fare è la cosa più intelligente (non credo, ma è la prima che mi è venuta in mente).
per farla breve: ho un cgi extra-wordpress che gestisce delle informazioni (una specie di classifica degli scrittori fantasy) e che, tra le altre cose, ad ogni caricamento mi scrive in una cartella in wp-content un piccolo file con il nome del vincitore.
ora, la mia idea era quella di inserire nel mio blog, nella barra laterale, un box con scritto “il vincitore è… ” facendo seguire il nome del vincitore scritto dal cgi.
il file in questione è un php semplice semplice che ha come unico contenuto un semplice $vincitore = “nomevincitore”;
quindi speravo di potermela cavare con una linea nel box di testo del tipo: <?php include(…); print $vincitore; ?>
ma non funziona.
qualcuno può suggerirmi come risolvere la situazione?
oh, ok, adesso vado a vedermelo. grazie!
potresti anche mettere semplicemente l’include e il print direttamente nel codice della sidebar, naturalmente prima o dopo il loop che gestisce i widget, altrimenti non è visibile… e non metti delle possibili fonti di pericolo nella pagina vera e propria…
Byez
—
Gollum1
WPItaly - Copyright Creative Commons: CC BY-NC-SA 4.0