Displaying collated content of field group
-
Hello!
I love, love, love this plugin.
But I’m running into a problem.I have one field group (with slug ‘audiounique’) that contains three fields:
FIELD 1
Name: Audio File
Slug: audiofile
Type: FileFIELD 2
Name: Sound Clip Info
Slug: audioinfo
Type: Textarea (Small height; HTML editor)FIELD 3
Name: Audio Composer
Slug: audiocomposer
Type: Textarea (Default height)I’d like to have a post which displays
audioinfo1
audiofile1
audiocomposer1audioinfo2
audiofile2
audiocomposer2etc.
I have tried to figure out the php magic to accomplish this, but haven’t had luck.
For example, I tried the following:
<?php
$audioinfo = simple_fields_values(“audioinfo”);
$audiofile = simple_fields_values(“audiofile”);
$audiocomposer = simple_fields_values(“audiocomposer”);for($i=0;$i<count($audioinfo);$i++)
{
echo $audioinfo[$i];
echo $audiofile[$i];
echo $audiocomposer[$i];
}
?>However, using this code, the audiocomposers values are rendered above all other values, like this:
ArrayBachArrayBeethovenArrayMozart
Thanks for your help!
- The topic ‘Displaying collated content of field group’ is closed to new replies.