WordPress.org

Forums

[resolved] Magic Fields -- how to get duplicate total? (3 posts)

  1. relish1227
    Member
    Posted 5 years ago #

    How do I get the total duplicates?

    In Flutter, you used:

    $fieldTotal = getGroupDuplicates ($fieldName);

    However, this is returning "1" when I know there are 6.

    It looks like the documentation on this isn't finished. Any help?

    Thanks.

  2. relish1227
    Member
    Posted 5 years ago #

    Okay, here's a solution. Maybe there is another, but this works.

    $fieldName = "casestudy_gallery_image";
    $fieldTotal = count(get_field_duplicate($fieldName));
  3. jamesgreenhouse
    Member
    Posted 5 years ago #

    That didn't work for me, it looks more suited to Flutter than Magic Fields

    For Magic Fields I used this:

    $fieldName = "casestudy_gallery_image";
    $fieldTotal = count($fieldName);

Topic Closed

This topic has been closed to new replies.

About this Topic