List of custom action hooks

The custom action hooks can be used to output content or perform actions at specific parts of the theme.

You can use the Hook name in from the table below with the WordPress function add_action. This is an advanced topic, if you are unsure consult a developer. See the examples below the table.

TagDescription
tcr_body_startImmediately after the opening <body> tag
tcr_outside_startImmediately inside the <div id=”outside”
tcr_headerThe page header section
tcr_after_headerImmediately inside the <div class=”after-header-wrap”
tcr_before_content_styleBefore the content style wrapper <div class=”content-style”
tcr_before_contentBefore the page content <main id=”content”>
tcr_after_contentAfter the page content
tcr_after_content_styleAfter the content style wrapper
tcr_sidebar_startBefore the sidebar
tcr_sidebar_endAfter the sidebar
tcr_before_footerBefore the footer
tcr_footerInside the footer
tcr_after_footerAfter the footer
tcr_body_endImmediately before the closing </body> tag
tcr_save_post(Admin only) called when saving the metabox options. The post ID is given as the only parameter.

Example

Add a subscribe form content after all single posts

1
2
3
4
5
6
7
8
function my_subscribe_form()
{
    if (is_singular() && get_post_type() == 'post' && function_exists('iphorm')) {
        echo '<h2>Thanks for reading, why not subscribe for updates?</h2>';
        echo iphorm(2);
    }
}
add_action('tcr_after_content', 'my_subscribe_form');
function my_subscribe_form()
{
    if (is_singular() && get_post_type() == 'post' && function_exists('iphorm')) {
        echo '<h2>Thanks for reading, why not subscribe for updates?</h2>';
        echo iphorm(2);
    }
}
add_action('tcr_after_content', 'my_subscribe_form');
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy