Skip to content

Instantly share code, notes, and snippets.

@ndiego
Created April 25, 2016 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ndiego/99e3450dc824d8f62f4c1d8c03c9b41c to your computer and use it in GitHub Desktop.
Save ndiego/99e3450dc824d8f62f4c1d8c03c9b41c to your computer and use it in GitHub Desktop.
<?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