Builder Church Block
Builder Church Block Support forum
Contents |
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:
add_action('init', 'add_excerpt_support_to_staff');
function add_excerpt_support_to_staff() {
add_post_type_support( 'staff', 'excerpt' );
}
Source: http://codex.wordpress.org/Function_Reference/add_post_type_support
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:
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' );
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:
http://example.com/wp-admin/admin.php?page=layout-editor&editor_tab=layouts&layout=4f30b1482cde8
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:
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' );
In the above, change "4f30b1482cde8" to the ID of layout that you wish to assign to Staff archive page.

