Visualizzazione 1 filone di risposte
Visualizzazione 1 filone di risposte
- Devi essere connesso per rispondere a questo topic.
Email: info@wpitaly.it
Home › Forum › Problemi Vari con WP › Raggruppare Custom Fields
Salve a tutti ragazzi,
al fine di sviluppare una funzionalità di un progetto su cui stiamo lavorando, avremmo necessità di utilizzare un custom post type nel quale vi saranno gruppi di custom fields ripetuti (con diversi set di valori).
Ipotizzando che i custom field siano 3 (data, importo1, importo2) vorremmo raggiungere il seguente risultato:
post_id = 1
data importo1 importo2
01/07/2013 15 EUR 15 EUR –> primo set
02/07/2013 20 EUR 20 EUR –> secondo set
Assumendo che tali valori siano salvati utilizzando le stesse 3 chiavi la domanda è la seguente:
come possiamo raggruppare tali valori, in modo tale che ogni metakey/custom field sia relazionato agli altri?
Possibilmente gradiremmo raggiungere tale risultato da codice, poichè il tutto si inquadra all’interno di una piattaforma Multisite (il custom post type viene creato direttamente nell’ADMIN multisite, e viene propagato a tutti i child site. Molti Plugin non sono compatibili con multisite e non vogliamo ritrovarci a dover eseguire le configurazioni sui singoli siti).
Esiste un modo per relazionare tra loro i custom field come descritto? o un escamotage per Salvare/Recuperare tali valori in modo tale che siano associati tra loro?
Grazie in anticipo,
WebYourMind
Ciao,
prova a guardare questo plugin
dovrebbe fare al caso tuo. C’è un addon che ti permette di avere l’opzione repeater.
E’ molto valido
Francesco Desiderio
WPItaly - Copyright Creative Commons: CC BY-NC-SA 4.0