Last active
August 1, 2025 09:19
-
-
Save nicmare/cc4ca006bb245fa650b8417fbbade474 to your computer and use it in GitHub Desktop.
disable blocksy hero section based on an assigned term
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// disable page title when assigned to schwebende navigation: | |
function disable_blocksy_hero_section($value){ | |
global $post; | |
if(!$post->ID) return $value; | |
if($p_terms = get_the_terms( $post_id, 'page_props' )){ // replace "page_props" with your custom taxonomy name | |
if ( ! is_wp_error( $p_terms ) ) { | |
if(in_array("schwebende-navigation",array_column($p_terms,"slug"))){ // replace "schwebende-navigation" with your term | |
$value = false; | |
} | |
} | |
} | |
return $value; | |
} | |
add_filter('blocksy:single:has-default-hero', 'disable_blocksy_hero_section',10,2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment