Description
Returns a field value with label with a template formet of the specified field (By given metaKey), all duplicate field value will be retrive.
Parameters
1 2 3 4 5 |
<?php get_duplicate_field_tpl($metaKey,$groupIndex=1,$post_id=null); ?> |
- $metaKey: The Meta key of the field . eg “book_author” (required)
- $groupIndex:Specific group index if you have duplicate group. Defaults to 1(not required)
- $post_id: Specific post ID where your value was entered. Defaults to current post ID(not required)
Usage
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
<?php $field = get_duplicate_field_tpl(book_author,1,405); // By using All parameter $field = get_duplicate_field_tpl(book_author,1); // using $metakey, $groupindex $field = get_duplicate_field_tpl(book_author); // using $metakey if($field){ echo $field; } else{ // do something } ?> |
Leave a Reply
You must be logged in to post a comment.