Home › Forum › Plugin e temi di WP › Ho creato (credo :P) un nuovo widget, ora come lo metto?
-
AutorePost
-
-
16 Aprile 2008 alle 14:11 #6352elegosPartecipante
Salve a tutti!
Suppongo di aver creato un nuovo widget (devo vedere se ho fatto tutto giusto!!!), solo che, nonostante l’abbia attivato come plugin e messo nella lista di widgets attivi, non riesco proprio a farlo visualizzarlo vedendo il blog!… come devo fare? Sicuramente ho sbagliato qualcosa… Inoltre volevo sapere come ottimizzare la connessione a MySQL (per ora l’ho fatta manuale, ma suppongo ce ne sia una già presente in WP sfruttabile!)
link a pastebin: http://pastebin.ca/987383
nuovo link a pastebin: http://pastebin.ca/987411
sito (dove si dovrebbe vedere ma non si vede): http://elegos.netsons.org/blog/
EDIT: ok come non detto non avevo salvato le modifiche ai widgets sorry >.< che stupido che sono… ma… per quanto riguarda invece la connessione MySQL?
EDIT2: non capisco perché non mi si visualizzano i dati dopo il titolo… e dire che l’ho testato prima di metterlo su come widget e funzionava… Ho anche provato a copiare la sintassi, ma niente… come mai?
-
16 Aprile 2008 alle 14:44 #52581SteveAglAmministratore del forum
Per interagire col DB è possibile ricorrere alla classe standard wpdb documentato sul codex inglese: http://codex.wordpress.org/Function_Reference/wpdb_Class
Plugin come nextgen gallery la usano pesantemente e possono essere un buon esempio.
-
16 Aprile 2008 alle 14:53 #52582elegosPartecipante
uhm… comunque ho risolto banalmente creando la nuova tabella (ero cosଠpreso che avevo testato il tutto su un altro server >.<)
Ora devo studiarmi un po’ quella classe… ma per includere wp-db.php quindi devo fare (assumento che è in wp-content/plugins) require_once(“../../wp-includes/wp-db.php”); ?
-
16 Aprile 2008 alle 15:12 #52589SteveAglAmministratore del forum
mi pare.. ma comunque è tutto scritto nella pagina del codex…
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.