Skip to content

Instantly share code, notes, and snippets.

@cdils
Created September 16, 2020 02:43
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 cdils/ee73652613a90bd0a3c2d1f1ab3be041 to your computer and use it in GitHub Desktop.
Save cdils/ee73652613a90bd0a3c2d1f1ab3be041 to your computer and use it in GitHub Desktop.
Alternative template path for Genesis Custom Blocks
<?php
/**
* Gets an alternate template path for Genesis Custom Blocks.
*
* This is handy if you want to include GCB blocks in a plugin versus your theme.
* @param string $path The template path.
* @return string An alternate template path.
*/
function ccb_get_alternate_template_path( $path ) {
unset( $path );
return __DIR__;
}
add_filter( 'genesis_custom_blocks_template_path', 'ccb_get_alternate_template_path' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment