Church Community Builder Core API
Getting Started
The plugin can be installed using the Plugins Screen in your WordPress admin menu under Plugins > Add New. You can also download the plugin from the WordPress Plugin Directory.
After you install the plugin, all you need to do is Activate it.
Configure API Settings
- First you’ll need to setup a dedicated API User in your Church Community Builder software. Follow the instructions on the support portal.
- When assigning services to this user, you’ll need to enable the
group_profiles
service for Groups functionality and thepublic_calendar_listing
service for Public Events functionality. - Under CCB Core API > API Settings enter
- Your Church Community Builder software subdomain. (Without http:// and without .ccbchurch.com).
- Your API Credentials (username and password which was setup in step 1 above).
- Click Save Changes.
After you have saved your changes you will be able to test your API Credentials.
Configure Groups
Basic Settings
Under CCB Core API > Groups you can enable Groups synchronization. This will synchronize your publicly listed groups.
Important: The most common mistake with group synchronization is the group settings in your Church Community Builder software:
In order to make a group public you’ll need to Edit the group. On the Group’s Options tab, check the Public Search checkbox. More info is available on the Church Community Builder support portal.
You can customize the Display Name and the URL Name (slug) of the Groups Custom Post Type. For example, some churches may call their groups “Small Groups”, “Life Groups”, “Meet-ups”, etc. The slug is the last part of the URL where the Custom Post Type’s archive page will be located.
More information about Custom Post Types (and how to create a template for their pages) can be found here.
If you plan to display the Group’s image on your site you can enable the Group Images setting. When groups are synchronized, this will download a copy of the group image to your Media Library and attach it to the Custom Post Type as a Featured Image.
Advanced Settings (Optional)
The Advanced Settings are preconfigured with the most common settings. These control how the Groups Custom Post Type will be available throughout WordPress (front and back end). These control the arguments sent to register_post_type
.
Configure Public Events
Basic Settings
Under CCB Core API > Public Events you can enable Public Events synchronization. This will synchronize your publicly listed events (aka your Public Calendar).
You can customize the Display Name and the URL Name (slug) of the Public Events Custom Post Type. For example, some churches may call their events “Meetups”, “Hangouts”, etc. The slug is the last part of the URL where the Custom Post Type’s archive page will be located.
More information about Custom Post Types (and how to create a template for their pages) can be found here.
Advanced Settings (Optional)
The Advanced Settings are preconfigured with the most common settings. These control how the Public Events Custom Post Type will be available throughout WordPress (front and back end). These control the arguments sent to register_post_type
.
Date Range Type (Relative Range)
When Public Events are synchronized, the plugin will fetch events that start after the “How Far Back” setting and that start before the “How Far Into The Future” setting. This is the best setting for most churches. It will continually import / remove events on your WordPress site on a rolling basis.
Date Range Type (Specific Range)
When Public Events are synchronized, the plugin will fetch the events that start after your Specific Start Date and that start before your Specific End Date. You might use this setting if you want to tightly manage which events appear on your site.
Synchronization
You have two options for synchronizing your Church Community Builder data: Manual Sync or Auto Sync.
Manual Sync
Under CCB Core API > Synchronize you can click the Synchronize button.
The synchronization runs in the background so you can safely navigate away while the synchronization takes place. Once the synchronization is complete, you’ll receive a notice on this page with the latest results (and if there were any errors).
Auto Sync
Under CCB Core API > Synchronize you can Enable Auto Sync.
The plugin has a Cache Expiration setting. This is how often the plugin will connect to the Church Community Builder API to check for updates. (About 90 minutes is recommended).
This runs as a background task so your site performance should be unaffected.
Using The Custom Post Types
Now that your Groups and/or Events are stored in WordPress as Custom Post Types, what’s next? WordPress has several options for displaying Custom Post Types, and here are some resources to help you get started.
Creating Custom Post Type Templates
The two most common templates give you an archive page (a listing of all groups or events) and a single page (an individual group or event).
You can also create templates for the Group & Event Categories & Tags (called “taxonomy templates”). For example, you’ll be able to display “All Groups in the ‘Married Couples’ category” or “All Events in the ‘Missions’ Group category” or “All Groups with the ‘Child Care Available’ tag.
Templates
Custom Post Type Templates (WordPress Codex)
Elegant Themes – Creating Custom Post Types (Beginning on Step 3)
Tuts+ A Guide To WordPress Custom Post Types – Part 1 (Ignore any steps about creating custom post types)
Tuts+ A Guide To WordPress Custom Post Types – Part 2 (Ignore any steps about creating custom post types)
Creating Custom Content (WPMU Dev, Beginning at “Displaying Your Post Type on the Front End”)
Custom Fields
Custom Fields (WordPress Codex)
WordPress Custom Fields 101: Tips, Tricks, and Hacks (WPBeginner)
Custom Taxonomies (Categories & Tags)
Custom Taxonomies (WordPress Codex)
Creating Custom Content – Taxonomies & Fields (WPMU Dev, Ignore any steps about creating taxonomies and fields)
Groups Schema
CCB Core Groups Schema
This is a complete listing of the default properties on a synchronized Group.
Custom Post Type
ccb_core_group
WP_Post Properties
Post Property | CCB Entity Property |
post_title | name |
post_content | description |
Post Meta
main_leader
calendar_feed
current_members
group_capacity
addresses
Custom Taxonomies
Taxonomy | Taxonomy Slug | CCB Entity Property |
Areas | ccb_core_group_area | area |
Days | ccb_core_group_day | meeting_day |
Departments | ccb_core_group_department | department |
Tags | ccb_core_group_tag | childcare_provided |
Times | ccb_core_group_time | meeting_time |
Types | ccb_core_group_type | group_type |
Events Schema
CCB Core Events Schema (Public Calendar)
This is a complete listing of the default properties on a synchronized Event.
Custom Post Type
ccb_core_calendar
WP_Post Properties
Post Property | CCB Entity Property |
post_title | event_name |
post_content | event_description |
Post Meta
date
start_time
end_time
event_duration
location
Custom Taxonomies
Taxonomy | Taxonomy Slug | CCB Entity Property |
Types | ccb_core_calendar_event_type | event_type |
Group Names | ccb_core_calendar_group_name | group_name |
Grouping Names | ccb_core_calendar_grouping_name | grouping_name |
Developer Documentation
For more information about the plugin code itself, how to extend upon the plugin, and how to customize it, visit the GitHub Wiki.