Everything you need to get started with Blocksy Theme and Companion

Filters/Actions reference

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.

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';

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

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

  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 '';

Dynamic CSS: Typography font value

Name: blocksy:css:typography:output:family
Type: Filter
Arguments: 2
Description: Change value for font family Since:
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:
Default: [$tax_slug]
Possible value: Array of taxonomy slugs

add_filter('blocksy:breadcrumbs:single:taxonomies:slugs', function ($s) {
	return ['post_tag'];

Not the solution you are looking for?

Please check other articles or open a support ticket.