Hooks #
Introduction
Hooks give you or your developer the ability to customize Advanced Sermons further. Everything from adding custom metabox fields, more filter sermon options, and new sections on the single sermon template.
Placement
This code should be placed in the functions.php file of your active theme or a custom plugin. This allows you to update Advanced Sermons without loosing any of your custom modifications.
Since
Hooks were introduced in Advanced Sermons 1.5 and Advanced Sermons Pro 1.1.
1. Single Sermon Template
<!-- Action hook to add custom content outside the container at the very TOP of single sermon template -->
add_action( 'asp_hook_sermon_single_top_holder', 'your_function_name' );
<!-- Action hook to add custom content inside the container at the very TOP of single sermon template -->
add_action( 'asp_hook_sermon_single_top', 'your_function_name' );
<!-- Action hook to add custom content in single sermon header details -->
add_action( 'asp_hook_sermon_single_header_details', 'your_function_name' );
<!-- Action hook to add custom content BEFORE single sermon video player. Added version 2.8. -->
add_action( 'asp_hook_sermon_single_before_video_player', 'your_function_name' );
<!-- Action hook to add custom content BEFORE single sermon content -->
add_action( 'asp_hook_sermon_single_before_content', 'your_function_name' );
<!-- Action hook to add custom content AFTER single sermon content -->
add_action( 'asp_hook_sermon_single_after_content', 'your_function_name' );
<!-- Action hook to add custom content inside the container at the very BOTTOM of single sermon template -->
add_action( 'asp_hook_sermon_single_bottom', 'your_function_name' );
<!-- Action hook to add custom content outside the container at the very BOTTOM of single sermon template -->
add_action( 'asp_hook_sermon_single_bottom_holder', 'your_function_name' );
2. Sermon Details Metabox
<!-- Action hook to add new fields to TOP of sermon details metabox -->
add_action( 'asp_hook_sermon_details_metabox_top', 'your_function_name' );
<!-- Action hook to add new fields to BOTTOM of sermon details metabox -->
add_action( 'asp_hook_sermon_details_metabox_bottom', 'your_function_name' );
<!-- Action hook to save custom sermon details metabox details -->
add_action( 'asp_hook_sermon_details_metabox_save', 'your_function_name' );
3. Archive Template
<!-- Action hook to add custom content outside the container at the very TOP of archive sermons -->
add_action( 'asp_hook_archive_top_holder', 'your_function_name' );
<!-- Action hook to add custom content inside the container at the very TOP of archive sermons -->
add_action( 'asp_hook_archive_top_container', 'your_function_name' );
<!-- Action hook to customize the sermon archive title -->
add_action( 'asp_hook_archive_title', 'your_function_name' );
<!-- Action hook to customize the criteria box -->
add_action( 'asp_hook_filter_criteria_box', 'your_function_name' );
<!-- Action hook to add custom content after the filter bar -->
add_action( 'asp_hook_archive_after_filter_bar', 'your_function_name' );
<!-- Action hook wrapped inside the top of the have_post function -->
add_action( 'asp_hook_archive_have_posts_top', 'your_function_name' );
<!-- Action hook wrapped inside the bottom of the have_post function -->
add_action( 'asp_hook_archive_have_posts_bottom', 'your_function_name' );
<!-- Action hook to add custom content inside the container at the very BOTTOM of archive sermons -->
add_action( 'asp_hook_archive_bottom_container', 'your_function_name' );
<!-- Action hook to add custom content outside the container at the very BOTTOM of archive sermons -->
add_action( 'asp_hook_archive_bottom_holder', 'your_function_name' );
<!-- Action hook to add custom content in sermon archive header details -->
add_action( 'asp_hook_sermon_archive_header_details', 'your_function_name' );
<!-- Action hook to add custom content BEFORE sermon archive excerpt -->
add_action( 'asp_hook_sermon_archive_before_excerpt', 'your_function_name' );
<!-- Action hook to add custom content AFTER sermon archive excerpt -->
add_action( 'asp_hook_sermon_archive_after_excerpt', 'your_function_name' );
<!-- Action hook to add custom content AFTER series details content. Added version 2.8. -->
add_action( 'asp_hook_series_details_after_content', 'your_function_name' );
<!-- Action hook to add custom content AFTER speaker details content. Added version 2.8. -->
add_action( 'asp_hook_speaker_details_after_content', 'your_function_name' );
4. Filter Bar
<!-- Action hook to add new fields to filter bar -->
add_action( 'asp_hook_filter_bar_fields', 'your_function_name' );
4. Customization Page
<!-- Action hook to add custom option settings -->
add_action( 'asp_hook_customization_options_page', 'your_function_name' );
#
#
Filters #
Introduction
Filters give you or your developer the ability to customize Advanced Sermons further.
Placement
This code should be placed in the functions.php file of your active theme or a custom plugin. This allows you to update Advanced Sermons without loosing any of your custom modifications.
Since
Hooks were introduced in Advanced Sermons 3.0 and Advanced Sermons Pro 2.2.
1. Series Shortcode
The series shortcode output filter was introduced in Advanced Sermons Pro 2.4
<!-- Filter to customize series shortcode output -->
add_filter( 'asp_pro_series_ shortcode_output', 'your_function_name' );
2. Archive Additional/Custom Taxonomies
This filter was introduced in Advanced Sermons 3.0
<!-- Filter to allow additional/custom taxonomies to be filtered on the archive template --> add_filter( 'asp_allowed_taxonomies_filter', 'your_function_name' ); <!-- Checks if additional/custom taxonomy is selected in the filter bar --> add_filter( 'asp_filter_selected_taxonomy', 'your_function_name' );
<!-- Add additional/custom taxonomy to criteria box results -->
add_filter( 'asp_custom_filter_criteria', 'your_function_name' );