Title: [Plugin: Connections] Using Sample Template
Last modified: August 19, 2016

---

# [Plugin: Connections] Using Sample Template

 *  Resolved [bstritesky](https://wordpress.org/support/users/bstritesky/)
 * (@bstritesky)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-connections-using-sample-template/)
 * I’m trying to use the included template from the “sample” folder, but am running
   into a few issues. Hoping someone can help diagnose the issue.
 * [Website link](http://www.wisconsinbaptist.org/?page_id=29)
 * I ran into problems on line 31 with GetConnectionGroups. Somewhere along the 
   line this must have changed to GetFamilyName, so I made that switch.
 * But now, I’m seeing a different error:
 * > Warning: Invalid argument supplied for foreach() in /home/mysoph/public_html/
   > wisconsinbaptist.org/wp-content/connections_templates/churches/template.php
   > on line 31
   > Warning: Invalid argument supplied for foreach() in /home/mysoph/public_html/
   > wisconsinbaptist.org/wp-content/connections_templates/churches/template.php
   > on line 139
 * The actual code is here:
    Lines 31-43
 *     ```
       foreach ($entry->getFamilyName() as $key_member_group=>$value_member_group) {
               // Increment
               $counter++;
   
               // Set family member id
               $member_group->set($key_member_group);
   
               if ($counter > 1) {
                   $member_list_first_names .= ", ".$member_group->getFirstName();
               } else {
                   $member_list_first_names = $member_group->getFirstName();
               }
           }
       ```
   
 * Line 139:
    `foreach ($entry->getFamilyName() as $key_member_group=>$value_member_group){`
 * Can someone help me figure out how to fix this? I know I’m not the only one trying
   to make the sample template work. I really want to get the maps feature working,
   like this site has: [http://pascochamber.org/member-directory/](http://pascochamber.org/member-directory/)
 * Thanks in advance!
 * [http://wordpress.org/extend/plugins/connections/](http://wordpress.org/extend/plugins/connections/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Steven](https://wordpress.org/support/users/shazahm1hotmailcom/)
 * (@shazahm1hotmailcom)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-connections-using-sample-template/#post-1867511)
 * Can you please email me your template zipped and I’ll look at it?

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: Connections] Using Sample Template’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/connections_2b7e99.svg)
 * [Connections Business Directory](https://wordpress.org/plugins/connections/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/connections/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/connections/)
 * [Active Topics](https://wordpress.org/support/plugin/connections/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/connections/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/connections/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Steven](https://wordpress.org/support/users/shazahm1hotmailcom/)
 * Last activity: [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-connections-using-sample-template/#post-1867511)
 * Status: resolved