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.

TagDate typeDescription
sticky_headerbooleanEnable sticky navigation
header_stylestring‘standard-header’ or ‘header_no_stretch’
footer_positionstring‘fixed’ or ‘absolute’
serene_optionsarrayThe full screen gallery options, see the portfolio help section
background_optionsarrayThe background image options, see the page Setting background image settings for a specific page
logo_urlstringThe URL that the logo should link to
intro_titlestringThe title text in the introduction section
intro_subtitlestringThe subtitle text in the introduction section
intro_stylestringThe style of the intro section, one of: ‘disabled’, ‘transparent-intro’, ‘black-transparent-intro’
introstringThe HTML of the intro section, shortcodes are parsed inside it
content_stylestringThe style of the content area, one of: ‘plain-black’, ‘full-width-transparent’
layoutstringThe page layout, one of: ‘left-sidebar’, ‘full-width’, ‘right-sidebar’
fontarrayThe 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_sizenumberThe size of the author avatar image in pixels on the author bio
blog_featured_imagebooleanShow the featured image on single posts
blog_featured_image_typestringThe type of featured image on single posts, one of: ‘full’, ‘left’, ‘right’
portfolio_featured_imagestringShow the featured image on single portfolio pages
status_avatarnumberThe size of the author avatar image in pixels on the list of status format posts
videoarrayThe configuration array for all videos
video_vimeoarrayThe configuration array for Vimeo videos
video_youtubearrayThe 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');
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy