Here we’ll outline a list of filters and actions that Blocksy calls at various points in the lifecycle of the website and the options UI.
Change sidebar position or disable sidebar at all
Name: blocksy:general:sidebar-position
Type: Filter
Arguments: 1
Description: Change the sidebar position for a certain screen. Since 1.7.72
Possible values: none/left/right
add_filter('blocksy:general:sidebar-position', function ($current_value) {
return 'none';
});
Change skip to content href
Name: blocksy:head:skip-to-content:href
Type: Filter
Arguments: 1
Description: Value for href
attribute of the skip to content link from Blocksy’s header. Default: #main
add_filter('blocksy:head:skip-to-content:href', function ($href) {
return '#other-main';
});
Change related posts module label
Name: blocksy:related-posts:module-label
Type: Filter
Arguments: 1
Description: Label for the related posts module in single posts or custom post types. Default: Customizer option. Since 1.8.6.3
add_filter('blocksy:related-posts:module-label', function ($title) {
return 'Other Title';
});
Change site title wrapper tag
Name: blocksy:header:logo:wrapper-tag
Type: Filter
Arguments: 1
Description: The HTML tag for the logo heading in the header. Default: div
. Since Blocksy 1.7.72
add_filter('blocksy:header:logo:wrapper-tag', function ($current_tag) {
return 'span';
});
Allow transparency for headers on certain screens
Name: blocksy:header:transparent:current-screen-allowed
Type: Filter
Arguments: 3, result, $current_section
, $transparent_result
Description: Allow/disallow transparency for headers on certain screens. Possible value: True/False. Since: Blocksy Companion 1.7.64
add_filter(
'blocksy:header:transparent:current-screen-allowed',
function ($has_transparent_header, $current_section, $transparent_result) {
return false;
},
10, 3
);
Change cart URL
Name: blocksy:header:cart:url
Type: Filter
Arguments: 1
Description: The URL for the cart item in the header. Possible value: URL as a string. Since 1.7.69
add_filter('blocksy:header:cart:url', function ($url) {
return 'https://custom-url.com';
});
Dynamic CSS: Typography font value
Name: blocksy:css:typography:output:family
Type: Filter
Arguments: 2
Description: Change value for font family Since: 1.8.6.6
Default: <font_family>
Possible value: string
add_filter('blocksy:css:typography:output:family', function ($font_family, $font_value) {
return 'PrefixFamily ' . $font_family;
}, 10, 2);
Single post breadcrumbs taxonomies slugs
Name: blocksy:breadcrumbs:single:taxonomies:slugs
Type: Filter
Arguments: 1
Description: Pick which taxonomy is being used in breadcrumbs for a particular post type Since: 1.8.6.9
Default: [$tax_slug]
Possible value: Array of taxonomy slugs
add_filter('blocksy:breadcrumbs:single:taxonomies:slugs', function ($s) {
return ['post_tag'];
});