List of custom filter hooks

The custom filter hooks can be used to modify specific parts of the theme on any specified context (see the Hook contexts page). The syntax of the hook name is:

tcr_{context}_{tag}

You can use any of the tags in the table below for the {tag} part of the hook name, you can find the {context} you want on the Hook contexts page. See the examples below the table and it should hopefully make sense.

Tag Date type Description
sticky_header boolean Enable sticky navigation
header_style string ‘standard-header’ or ‘header_no_stretch’
footer_position string ‘fixed’ or ‘absolute’
serene_options array The full screen gallery options, see the portfolio help section
background_options array The background image options, see the page Setting background image settings for a specific page
logo_url string The URL that the logo should link to
intro_title string The title text in the introduction section
intro_subtitle string The subtitle text in the introduction section
intro_style string The style of the intro section, one of: ‘disabled’, ‘transparent-intro’, ‘black-transparent-intro’
intro string The HTML of the intro section, shortcodes are parsed inside it
content_style string The style of the content area, one of: ‘plain-black’, ‘full-width-transparent’
layout string The page layout, one of: ‘left-sidebar’, ‘full-width’, ‘right-sidebar’
font array The font configuration (see includes/framework.php for available fonts), e.g.

1
2
3
4
5
6
array(
    'type' => 'cufon',
    'name' => 'Comfortaa',
    'family' => 'Comfortaa',
    'selector' => 'h1, h2, h3'
)
array(
    'type' => 'cufon',
    'name' => 'Comfortaa',
    'family' => 'Comfortaa',
    'selector' => 'h1, h2, h3'
)
author_bio_avatar_size number The size of the author avatar image in pixels on the author bio
blog_featured_image boolean Show the featured image on single posts
blog_featured_image_type string The type of featured image on single posts, one of: ‘full’, ‘left’, ‘right’
portfolio_featured_image string Show the featured image on single portfolio pages
status_avatar number The size of the author avatar image in pixels on the list of status format posts
video array The configuration array for all videos
video_vimeo array The configuration array for Vimeo videos
video_youtube array The configuration array for YouTube videos

Examples

The code should be added to wp-content/themes/storm/functions.php

Change the layout on all archive pages

1
2
3
4
5
6
add_filter('tcr_archive_layout', 'tcr_set_archive_layout');
 
function tcr_set_archive_layout($layout)
{
    return 'full-width';
}
add_filter('tcr_archive_layout', 'tcr_set_archive_layout');

function tcr_set_archive_layout($layout)
{
    return 'full-width';
}

Change the featured image type for a single post (post ID 15)

1
2
3
4
5
6
add_filter('tcr_singular-post-15_blog_featured_image_type', 'tcr_set_post15_image_type');
        
function tcr_set_post15_image_type($type)
{
    return 'left';
}
add_filter('tcr_singular-post-15_blog_featured_image_type', 'tcr_set_post15_image_type');
        
function tcr_set_post15_image_type($type)
{
    return 'left';
}

Disable the sticky header on portfolio pages

1
add_filter('tcr_singular-portfolio_sticky_header', '__return_false');
add_filter('tcr_singular-portfolio_sticky_header', '__return_false');

Still having trouble? Head over to the forums.

Forums