Hooks | Developers

Hooks | Developers

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 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 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 very BOTTOM of single sermon template -->
add_action( 'asp_hook_sermon_single_bottom', 'your_function_name' );

2. Single Sermon 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 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' );

4. Filter Bar

<!-- Action hook to add new fields to filter bar -->
add_action( 'asp_hook_filter_bar_fields', 'your_function_name' );