Last active
April 21, 2016 03:25
-
-
Save marushu/9cc4bc92ddd96262985a8bced97d0ca9 to your computer and use it in GitHub Desktop.
ACFのリピーターフィールドを取り出す。forで回して一発で出てくるので便利 :D
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 | |
$post_id = 19409; | |
$child_field_count = intval( get_post_meta($post_id, 'supportcase_', true) ); | |
var_dump($child_field_count); | |
for ( $i=0; $i < $child_field_count; $i++ ){ | |
$case = get_post_meta($post_id, sprintf('supportcase__%d__case', $i), true); | |
var_dump($case); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment