Church Theme Framework is a library of code that assists with the development of church WordPress themes that use the Church Content functionality plugin (note that themes can also be developed to use the plugin without this framework). You can find the framework on GitHub.
This is a developer guide. Regular users do not need to do anything with the framework. It is included with each of our themes.
Church Theme Framework is a drop-in framework. In other words, it’s a directory of includes containing functions, classes and other code useful to multiple, similar themes.
- Faster development
- Easier maintenance
- Consistent features
Developers can use as many or as few framework features as needed.
- Integration with the Church Content plugin which adds post types, taxonomies and fields for sermons, events, people and locations
- Require a minimum version of WordPress and Internet Explorer
- Load translation file from wp-content/languages/themes/textdomain-locale.mo for safe updates
add_theme_supportfeatures, helper functions and constants
- Helper function for detecting current content “section” (sermons, blog, events, etc.)
- Helper functions for displaying native galleries (posts using gallery, counts for a gallery, gallery cover, etc.)
- Sermon archives by year, month and day
- Podcasting and recurring events provided by the Church Content plugin
- Correct prev/next sorting of events (event date), locations and people (manual order)
- Widgets for sermons, events, locations, people, galleries, taxonomies, giving, slides and highlights
- Widget output is controlled by template files
- Ability to disable or override specific widget fields
- Restrict certain widgets to specific sidebars and vice-versa
- Support for multiple color schemes
- Support for preset backgrounds in Theme Customizer
- Responsive video and audio embeds plus generic branding
- Featured image sizing notes, support for upscaling
- Custom image sizes for galleries based on number of columns
- Ability to force “Save As” of file in media library via special URL (for “Download” buttons)
- Automatic friendly
<title>‘s with page numbering (can be overridden by SEO plugins)
- Automatic breadcrumb path considering archives, taxonomies, post types, attachments, etc.
- Support for attachments to inherit parent post’s discussion status
- Automatic URL replacement and menu location setting for imported sample content
The framework was developed for our use at churchthemes.com. We decided to make it public for others who build church sites with WordPress.
Please note that while we do not intend to introduce breaking changes, we reserve the right to change course in future versions as necessary for our own development needs. We do not provide development support but if you find a bug, please submit an issue on GitHub and we will take a look.
You will need to be familiar with the Church Content plugin since the framework is made specifically for building themes that use the post types, taxonomies and custom fields that the plugin provides.
This guide assumes you are proficient in WordPress Theme Development.
If you use Git, you can clone the repository and get the CT Meta Box submodule in one shot. Move into your theme’s directory then clone the repository.
cd path/to/theme git clone --recursive https://github.com/churchthemes/church-theme-framework.git framework
- Create a framework directory in your theme containing the contents of the GitHub repository (zip)
- Add the contents of the CT Meta Box repository (zip) to framework/includes/libraries/ct-meta-box
Add this to your theme’s functions.php file.
You will need to be very familiar with the framework’s code in order to leverage it. Please browse the contents of this repository in order to understand how the framework is built. This guide is very basic and only covers getting started.
If you find this framework does more than you need, you may consider developing your theme with support for the Church Content plugin apart from this framework. The post types, taxonomies and custom fields will be directly available to you whether or not this framework is used.
There are many framework features you can enable using WordPress’s
add_theme_support function. Here are code search results showing where these features are implemented. Some work without additional aguments while many require specific configuration.
There are several helper functions included to assist you with development. Browse the scripts in the includes directory to become acquainted.
framework.php defines several constants pertaining to the theme and framework that you may find useful.
Browse the code from one of our commercial themes for a complete example of a finished theme using this framework. This is likely something you will need to do in order to get the most out of the framework.
View the releases on GitHub.