Builder Blocks: Church

From IThemes Codex
(Difference between revisions)
Jump to: navigation, search
(Locations)
(Additional Links)
 
(14 intermediate revisions by one user not shown)
Line 1: Line 1:
 
'''Builder Church Block''' adds Sermons and Staff post types for easily adding content to your church web site.
 
'''Builder Church Block''' adds Sermons and Staff post types for easily adding content to your church web site.
  
'''[http://ithemes.com/purchase/city-church/ Builder Child Child - City Church]''' and '''[http://ithemes.com/purchase/gallery-church/ Builder Child - Gallery Church]''' are designed to work specifically with the Builder Church Block by providing styling for staff and sermon archives.
+
<br />
 +
 
 +
==Related Child Themes==
 +
 
 +
'''[http://ithemes.com/purchase/city-church/ Builder Child Child - City Church]''' and '''[http://ithemes.com/purchase/gallery-church/ Builder Child - Gallery Church]''' are designed to work specifically with the Builder Church Block by providing styling for staff and sermon archives, each Builder child theme fully integrates with all Builder Church Block features.
  
  
Line 83: Line 87:
 
<br />
 
<br />
  
[[File:Locations-menu.png|800px|link=]]
+
[[File:sermons-menu.png|800px|link=]]
  
 
<br />
 
<br />
  
The '''Locations''' menu expands to reveal several pages:
+
The '''Sermons''' menu expands to reveal several pages:
  
*'''All Locations''' - A listing of all location"posts"
+
*'''All Sermons''' - A listing of all sermon "posts"
*'''Add New''' - The "Add Location" page
+
*'''Add New''' - The "Add New Sermon" page
*'''Features''' - A listing of location feature types, including by default breakfast, brunch, buffet, business casual, carry out, casual, dancing, delivery, dinner, family friendly, fine dining, etc.
+
*'''Sermon Categories''' - A listing of sermon categories
*'''Cuisine''' - A listing of location cuisine types, including American, Asian, Bagels, Bakery, Barbecue, Burgers, Cajun, etc.)
+
*'''Sermon Tags''' - A listing of sermon tags
  
==Adding a New Location==
+
==Adding a New Sermon==
  
To add a new location, click '''Add New'''. Add the location title, text, address (and map), featured image, features, cuisines, hours and contact details.
+
To add a new location, click '''Add New'''. Add the sermon title, text, featured image, sermon audio file and apply sermon categories and tags
  
 
<br />
 
<br />
  
[[File:Add-new-location.png|800px|link=]]
+
[[File:add-new-sermon.png|800px|link=]]
  
 
<br />
 
<br />
  
Press '''Publish'''. Your new location will now be visible on the site from the URL located beneath the Location Title.
+
Press '''Publish'''. Your new sermon will now be visible on the site from the URL located beneath the sermon title.
  
 
<br />
 
<br />
  
===Features===
+
===Sermon Categories===
  
The '''Features''' page lists available feature taxonomies that can be applied to locations. You can also add custom course categories. You can customize the allergy categories by adding new allergies or removing the defaults.
+
The '''Sermon Categories''' page lists available sermon categories.
  
 
<br />
 
<br />
  
[[File:Features.png|800px|link=]]
+
[[File:sermon-categories.png|800px|link=]]
  
 
<br />
 
<br />
  
===Cuisine===
+
===Sermon Tags===
  
The '''Cuisine''' page lists available feature taxonomies that can be applied to locations. You can also add custom course categories. You can customize the allergy categories by adding new allergies or removing the defaults.
+
The '''Sermon Tags''' page lists available sermon tags.
  
 
<br />
 
<br />
  
[[File:Locations.png|800px|link=]]
+
[[File:sermon-tags.png|800px|link=]]
  
 
<br />
 
<br />
  
 
=Customization Examples=
 
=Customization Examples=
*[[Builder_Blocks:_Restaurant_-_Example_Customizations#Setting_up_the_menu_listing_page_and_course_archive_pages_like_the_Builder_Child-Entree_demo|Setting up the menu listing page and course archive pages like the Builder Child-Entree demo]]
+
*[[Builder_Blocks:_Church_-_Example_Customizations#How_to_add_Custom_Fields_support_for_Sermon_entries|How to add manual excerpt support for Staff entries]]
*[[Builder_Blocks:_Restaurant_-_Example_Customizations#Enabling_commenting_in_single_location_entry_pages|Enabling commenting in single location entry pages]]
+
*[[Builder_Blocks:_Church_-_Example_Customizations#How_to_add_regular_Category_support_for_Sermon_entries|How to add Custom Fields support for Sermon entries]]
*[[Builder_Blocks:_Restaurant_-_Example_Customizations#Displaying_course_description_on_course_term_archive_pages|Displaying Course description on Course Term archive pages]]
+
*[[Builder_Blocks:_Church_-_Example_Customizations#How_to_assign_a_layout_to_Staff_and_Sermon_archive_pages|How to add regular Category support for Sermon entries]]
 +
*[[Builder_Blocks:_Church_-_Example_Customizations#To_assign_a_layout_to_Staff_archive_page|How to assign a layout to Staff and Sermon archive pages]]
 +
**[[Builder_Blocks:_Church_-_Example_Customizations#To_assign_a_layout_to_Staff_archive_page|To assign a layout to Staff archive page]]
 +
**[[Builder_Blocks:_Church_-_Example_Customizations#To_assign_a_layout_to_Sermons_archive_page|To assign a layout to Sermons archive page]]
 +
*[[Builder_Blocks:_Church_-_Example_Customizations#How_to_assign_a_layout_to_a_specific_category_term_archive_page|How to assign a layout to a specific category term archive page]]
 +
*[[Builder_Blocks:_Church_-_Example_Customizations#How_to_assign_a_layout_to_Sermon_Tag_archive_page|How to assign a layout to Sermon Tag archive page]]
 +
*[[Builder_Blocks:_Church_-_Example_Customizations#How_to_display_Staff_entries_on_a_custom_Page|How to display Staff entries on a custom Page]]
 +
*[[Builder_Blocks:_Church_-_Example_Customizations#How_to_replace_social_media_text_links_in_single_Staff_entry_pages_with_images|How to replace social media text links in single Staff entry pages with images]]
  
 
=Additional Links=
 
=Additional Links=
  
*[http://ithemes.com/forum/forum/94-builder-block-restaurant/ Support Forum for Builder Block Restaurant]
+
*[http://ithemes.com/forum/forum/134-builder-block-church/ Support Forum for Builder Block Church]
 +
*[http://ithemes.com/2012/06/11/builder-church-block-now-compatible-with-all-builder-child-themes/ Builder Church Block Now Compatible with All Builder Child Themes]
  
 
= See also  =
 
= See also  =
Line 147: Line 159:
 
<br />
 
<br />
 
[[:Builder|← Back to Builder Codex Home]]
 
[[:Builder|← Back to Builder Codex Home]]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
[http://ithemes.com/forum/forum/134-builder-block-church/ Builder Church Block Support forum]
 
 
== Introduction ==
 
 
Originally, Builder's Church Block was designed to work specifically with Gallery Church and City Church Builder child themes, but now each Builder child theme fully integrates with all Builder Church Block features.
 
 
Builder Church Block makes it easy to keep your church website updated by adding custom post types for sermon and staff content. After uploading and activating the Builder Church Block to your plugins area, both "Staff" and "Sermon" menus will be added to the WordPress dashboard.
 
 
From there, simply add your content and then publish like any other WordPress post or page.
 
 
The active Builder child theme goes to work providing the styling of your content.
 
 
[http://ithemes.com/2012/06/11/builder-church-block-now-compatible-with-all-builder-child-themes/ Source].
 
 
== How to add manual excerpt support for Staff entries ==
 
 
If you would like to have Excerpt metabox in Staff entry edit screen, add the following in City Church child theme's functions.php:
 
 
<pre class="brush:php;">
 
// =========================================
 
// = Add Excerpt support to Staff entries =
 
// =========================================
 
 
add_action('init', 'add_excerpt_support_to_staff');
 
 
function add_excerpt_support_to_staff() {
 
add_post_type_support( 'staff', 'excerpt' );
 
}
 
</pre>
 
 
[[Image:2011-12-08 19-51-06.png|800px|thumb|none]]
 
 
[[Image:2011-12-08 19-52-28.png|669px|thumb|none]]
 
 
[[Image:2011-12-08 19-58-07.png|754px|thumb|none]]
 
 
Source: http://codex.wordpress.org/Function_Reference/add_post_type_support
 
 
== How to add Custom Fields support for Sermon entries ==
 
 
If you would like to have Custom Fields meta box in Sermon entry add/edit screen, add the following in City Church child theme's <code>functions.php</code>:
 
 
<pre class="brush:php;">
 
// ===============================================
 
// = Add Custom Fields support to Sermon entries =
 
// ===============================================
 
 
add_action('init', 'add_cf_support_to_sermon');
 
 
function add_cf_support_to_sermon() {
 
add_post_type_support( 'sermon', 'custom-fields' );
 
}
 
</pre>
 
 
== How to add regular Category support for Sermon entries ==
 
 
If you would like to have Categories meta box in Sermon entry edit screen, add the following in City Church child theme's <code>functions.php</code>:
 
 
<pre class="brush:php;">
 
// ====================================================
 
// = Add standard Category support to Sermon entries =
 
// ====================================================
 
 
function wpse6098_init() {
 
    register_taxonomy_for_object_type( 'category', 'sermon' );
 
}
 
add_action( 'init', 'wpse6098_init', 100 ); // 100 so the post type has been registered
 
</pre>
 
 
Source: http://wordpress.stackexchange.com/questions/6098/is-there-a-way-to-use-regular-categories-with-custom-post-types
 
 
== How to assign a layout to Staff and Sermon archive pages ==
 
 
At My Theme -> Layouts & Views, currently it is not possible to assign a layout to Staff and Sermon archive pages using the Views feature of Builder. "Archives" view can be used, but this view will apply to all date and category archives, tag archives and author archives unless overridden with more specific views.
 
 
It is possible to assign a particular layout (ensure that it has a content module) to both Staff and Sermons archive pages separately by adding code in City Church's functions.php.
 
 
=== To assign a layout to Staff archive page ===
 
 
Add this code at the end of City Church's functions.php:
 
 
<pre class="brush:php;">
 
function custom_filter_staff_layout( $layout_id ) {
 
    if ( is_post_type_archive('staff') )
 
            return '4f30b1482cde8';
 
   
 
    return $layout_id;
 
}
 
add_filter( 'builder_filter_current_layout', 'custom_filter_staff_layout' );
 
</pre>
 
 
In the above, change "4f30b1482cde8" to the ID of layout that you wish to assign to Staff archive page.
 
 
To find the ID for a Layout, go to the Layouts listing, copy the edit link for the desired Layout, paste the link somewhere, and grab the text after the last equal sign. For example, consider the following link:
 
 
<pre>http://example.com/wp-admin/admin.php?page=layout-editor&editor_tab=layouts&layout=4f30b1482cde8</pre>
 
 
The Layout's ID for the above is 4f30b1482cde8.
 
 
=== To assign a layout to Sermons archive page ===
 
 
Add this code at the end of City Church's functions.php:
 
 
<pre class="brush:php;">
 
function custom_filter_sermons_layout( $layout_id ) {
 
    if ( is_post_type_archive('sermon') )
 
            return '4f30b1482cde8';
 
   
 
    return $layout_id;
 
}
 
add_filter( 'builder_filter_current_layout', 'custom_filter_sermons_layout' );
 
</pre>
 
 
In the above, change "4f30b1482cde8" to the ID of layout that you wish to assign to Staff archive page.
 
 
[http://ithemes.com/forum/topic/22220-assigning-a-layout-for-post-page-by-category/page__view__findpost__p__104482 Source].
 
 
== How to assign a layout to a specific category term archive page ==
 
 
As an example, let's say there is a Sermon Category titled "Life", all sermon entries that are categorized under "Life" will appear at http://site.com/sermon/category/life/. This category term archive page uses "Full Width" layout by default (assuming, the Archive view that ships with Builder which sets all archive pages to Full Width layout is not deleted). If you would like apply another layout to this page, add the following code at end of child theme's functions.php:
 
 
<pre class="brush:php;">
 
function custom_filter_life_layout( $layout_id ) {
 
    if ( is_tax( 'sermon_category', 'life' ) )
 
            return '4f7a81f021fbc';
 
   
 
    return $layout_id;
 
}
 
add_filter( 'builder_filter_current_layout', 'custom_filter_life_layout' );
 
</pre>
 
 
In the above, change "life" to the slug of the particular Sermon category of interest. Also change "4f7a81f021fbc" to the ID of layout that you wish to assign to "Life" sermon category archive page. "custom_filter_life_layout" is just the name of function and it can be changed per your liking.
 
 
Ref.: http://codex.wordpress.org/Function_Reference/is_tax
 
 
== How to assign a layout to Sermon Tag archive page ==
 
 
Example URL of a Sermon Tag archive page is http://localhost/builder3/sermon-tag/church/ where "Church" is a Sermon tag term. By default such archive pages uses <code>Archives</code> view (associated with "Full Width" layout by default at My Theme -> Layouts & Views -> Views).
 
 
If you would like to set a layout to Sermon Tag archive pages, add the following code at end of child theme's functions.php:
 
 
<pre class="brush:php;">
 
function custom_filter_sermontagarchive_layout( $layout_id ) {
 
    if ( is_tax('sermon_tag') )
 
            return '4e15829c9f4c5';
 
   
 
    return $layout_id;
 
}
 
add_filter( 'builder_filter_current_layout', 'custom_filter_sermontagarchive_layout' );
 
</pre>
 
 
In the above, change "4e15829c9f4c5" to the ID of layout that you wish to assign to Sermon Tag archive pages. "custom_filter_sermontagarchive_layout" is just the name of function and it can be changed per your liking.
 
 
== How to display Staff entries on a custom Page ==
 
 
When BuilderChild-City-Church is the active theme and Builder Church Block plugin is active, a list of Staff entries will automatically be available at yourdomain.com/staff. If you would like the same also to be output on any Page of your choice, follow the instructions below:
 
 
'''1.''' Copy ''archive-staff.php'' in BuilderChild-City-Church as ''my-staff-listing.php''. Edit this file.
 
 
Add
 
 
<pre class="brush:php;">
 
<?php
 
/*
 
Template Name: Staff Listing
 
*/
 
?>
 
</pre>
 
 
at the top.
 
 
Remove the comments in:
 
 
<pre class="brush:php;">
 
/*
 
$args = array(
 
'ignore_sticky_posts' => true,
 
'post_type' => 'staff',
 
'posts_per_page' => 3,
 
'paged' =>  get_query_var( 'paged' ),
 
);
 
 
query_posts( $args );
 
*/
 
</pre>
 
 
You may want to change the value of posts_per_page to a higher number like 10.
 
 
Here is a screenshot after making the above changes:
 
 
[[File:2012-02-08 13-18-13.png]]
 
 
'''2.''' Create a Page (if one doesn't already exist) where you would like to display the list of Staff entries. Leave the content empty. Select "Staff Listing" Template in ''Page Attributes'' meta box.
 
 
'''3.''' Add the following at the end of child theme's style.css:
 
 
<pre class="brush:css;">
 
/* ================= */
 
/* = Staff Archive = */
 
/* ================= */
 
body.page-template-my-staff-listing-php .staff-archive .loop-header {
 
height: 40px;
 
}
 
body.page-template-my-staff-listing-php .staff-archive .loop-title {
 
font-size: 96px;
 
line-height: 65px;
 
color: #F6f6f6;
 
text-shadow: 1px 1px #FFF, 2px 2px #FFF, 3px 3px #FFF, 4px 4px #FAFAFA;
 
}
 
body.page-template-my-staff-listing-php .staff {
 
display: inline-block;
 
width: 33%;
 
vertical-align: top;
 
position: relative;
 
margin-bottom: 0;
 
}
 
body.page-template-my-staff-listing-php .staff .archive-staff-inner {
 
background: #EEEEEE;
 
border: 1px solid #DDDDDD;
 
padding: 1em;
 
margin: 1em;
 
-webkit-border-radius: 4px;
 
-moz-border-radius: 4px;
 
border-radius: 4px;
 
}
 
body.page-template-my-staff-listing-php .staff .archive-staff-inner:hover {
 
background: #F6F6F6;
 
border: 1px solid #EEEEEE;
 
 
}
 
body.page-template-my-staff-listing-php .staff .entry-header {
 
width: 100%;
 
max-width: 275px;
 
padding: 10px 0 0;
 
height: 55px;
 
margin: -65px auto 0;
 
background: #363636;
 
background: rgba(0,0,0,.3);
 
}
 
body.page-template-my-staff-listing-php .staff .entry-header .entry-title {
 
padding: 0 5px;
 
margin: 0;
 
}
 
body.page-template-my-staff-listing-php .staff .entry-header .entry-title a {
 
color: #EEEEEE;
 
}
 
body.page-template-my-staff-listing-php .staff .entry-header .entry-meta {
 
border: 0;
 
margin: 0 5px;
 
color: #BBBBBB;
 
}
 
body.page-template-my-staff-listing-php .staff .entry-header .entry-meta a {
 
color: #DDDDDD;
 
}
 
body.page-template-my-staff-listing-php .staff .entry-image a {
 
display: block;
 
}
 
body.page-template-my-staff-listing-php .staff img {
 
padding: 0;
 
margin: 0 auto;
 
border: 0;
 
width: 100%;
 
max-width: 275px;
 
display: block;
 
height:auto;
 
-webkit-border-radius: 2px;
 
-moz-border-radius: 2px;
 
border-radius: 2px;
 
}
 
 
</pre>
 
 
== How to replace social media text links in single Staff entry pages with images ==
 
 
[[File:2012-02-26 19-06-14.jpg|644px|thumb|none|Before]]
 
 
[[File:2012-02-26 19-05-46.jpg|643px|thumb|none|After]]
 
 
Add the following at the end of child theme's style.css:
 
 
<pre class="brush:css;">
 
body.single .staff .entry-meta.staff-info li {
 
    width: 15%;
 
}
 
 
body.single .staff .entry-meta.staff-info li a {
 
    text-indent: -9999em;
 
    display: block;
 
    height: 32px;
 
}
 
 
body.single .staff .entry-meta.staff-info li.email a {
 
    background: url('http://ithemes.com/builder/misc/social-media-icons/32/email.png') no-repeat;
 
}
 
 
body.single .staff .entry-meta.staff-info li.twitter a {
 
    background: url('http://ithemes.com/builder/misc/social-media-icons/32/twitter.png') no-repeat;
 
}
 
 
 
body.single .staff .entry-meta.staff-info li.facebook a {
 
    background: url('http://ithemes.com/builder/misc/social-media-icons/32/facebook.png') no-repeat;
 
}
 
</pre>
 
 
Please save the social media icon images, upload them to your server and use them in the above CSS code.
 

Latest revision as of 04:14, August 10, 2013

Builder Church Block adds Sermons and Staff post types for easily adding content to your church web site.


Contents

Related Child Themes

Builder Child Child - City Church and Builder Child - Gallery Church are designed to work specifically with the Builder Church Block by providing styling for staff and sermon archives, each Builder child theme fully integrates with all Builder Church Block features.


Installation

  1. Download the Builder Church Block plugin from iThemes Member Panel.
  2. From the WordPress dashboard, navigate to Plugins > Add New.
  3. Install and Activate the builder-block-church zip file.


Once Builder Church Block has been installed, you'll notice two new menus have been added to the left-hand navigation of your WordPress dashboard:

  • Staff - Adds staff members with a title (name), text, staff info (email address, Twitter Username, Facebook URL), featured image and a staff position type
  • Sermons - Add sermons with a title, text, sermon audio file, featured image, sermon category and sermon tags


Staff-sermons-menu.png

Staff

Builder Church Block creates a custom post type for Staff displayed in a staff "archive" visible on the City Church demo site.


City-church-staff.png


The Staff Menu


Staff-menu.png


From the WordPress dashboard, the Staff menu expands to reveal several pages:

  • All Staff - A listing of all staff "posts"
  • Add New - The "Add New Staff " page
  • 'Staff Positions - A listing of staff position types, including by default Music Director, Senior Pastor and Youth Pastor

Adding a New Staff

To add a new staff member, click Add New. Add the staff member title (name), a description, staff info (email address, Twitter Username, Facebook URL), featured image and a staff position type.


Add-new-staff.png


Press Publish. Your new staff member will now be visible on the site from the URL located beneath the Staff Title.


Staff Positions

The Staff Positions page in the Staff Menu lists available staff position taxonomies that can be applied to staff. Default staff positions include Music Director, Senior Pastor and Youth Pastor. You can customize the staff position taxonomies by adding new positions or removing the defaults.


Staff-positions.png


Sermons

Builder Church Block creates a custom post type for Sermons displayed in a sermon "archive" visible on the City Church Demo Site.


Sermons-archive.png


The Sermons Menu


Sermons-menu.png


The Sermons menu expands to reveal several pages:

  • All Sermons - A listing of all sermon "posts"
  • Add New - The "Add New Sermon" page
  • Sermon Categories - A listing of sermon categories
  • Sermon Tags - A listing of sermon tags

Adding a New Sermon

To add a new location, click Add New. Add the sermon title, text, featured image, sermon audio file and apply sermon categories and tags


Add-new-sermon.png


Press Publish. Your new sermon will now be visible on the site from the URL located beneath the sermon title.


Sermon Categories

The Sermon Categories page lists available sermon categories.


Sermon-categories.png


Sermon Tags

The Sermon Tags page lists available sermon tags.


Sermon-tags.png


Customization Examples

Additional Links

See also


← Back to Builder Codex Home

Personal tools
Namespaces
Variants
Actions
iThemes Codex
Codex Navigation
Toolbox