-
-
Save Roy-Oto/42963a01dd3039f47016341fb551b0fd to your computer and use it in GitHub Desktop.
To display Loop in Custom Field Suite.
This file contains 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 | |
/* | |
A loop field named "gallery" with sub-fields "slide_title" and "upload" | |
Loop fields return an associative array containing *ALL* sub-fields and their values | |
NOTE: Values of sub-loop fields are returned when using get() on the parent loop! | |
*/ | |
$fields = CFS()->get( 'gallery' ); | |
foreach ( $fields as $field ) { | |
echo $field['slide_title']; | |
echo $field['upload']; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment