Created
October 24, 2010 19:56
-
-
Save gnuget/643920 to your computer and use it in GitHub Desktop.
Get duplicate fields in duplicate groups
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** in this example my field is dd_field and i can get the index of the groups using a field name | |
* (http://wiki.magicfields.org/doku.php?id=front-end_functions#getgrouporder) | |
*/ | |
$grupos = getGroupOrder('dd_field'); | |
/** now, using the index of the groups i can get all the duplicate fields into a group**/ | |
foreach($grupos as $grupo) { | |
/** get_field_duplicate return a array with all values of a field **/ | |
/**http://wiki.magicfields.org/doku.php?id=front-end_functions#get_field_duplicate**/ | |
$fields = get_field_duplicate('dd_field',$grupo); | |
print_r($fields); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment