Created
April 25, 2016 14:20
-
-
Save ndiego/99e3450dc824d8f62f4c1d8c03c9b41c to your computer and use it in GitHub Desktop.
This file contains 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 | |
// Do NOT include the opening php tag shown above. Copy the code shown below. | |
// To use this filter, it needs to be added to your functions.php file | |
add_filter( 'blox_disable_content_blocks', 'disable_landingpage_blocks', 10, 5 ); | |
/** | |
* | |
* @param bol $disable The disable test, defaults to false | |
* @param string $postition The position hook of the block | |
* @param string $id The id of the block | |
* @param array $block An array of all the block's settings/content | |
* @param bol $global Indicates whether the block is Global or Local | |
*/ | |
function disable_landingpage_blocks( $disable, $position, $id, $block, $global ) { | |
if ( is_page_template( 'page_landing.php' ) && $position == 'genesis_after_header' ) { | |
return true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment