Created
September 16, 2020 02:43
-
-
Save cdils/ee73652613a90bd0a3c2d1f1ab3be041 to your computer and use it in GitHub Desktop.
Alternative template path for Genesis Custom Blocks
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 | |
/** | |
* 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