Last active
November 9, 2018 19:58
-
-
Save roborracle/e92b57fe86fcbc4cb8e8b32384c4d96d 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 | |
// here is part of what I've got in my functions.php | |
function add_hooks_outside_structural_wraps() { | |
$structural_wraps = array( | |
'header', | |
'menu-primary', | |
'menu-secondary', | |
'site-inner', | |
'footer-widgets', | |
'footer' | |
); | |
foreach ( $structural_wraps as $context ) { | |
add_filter( "genesis_structural_wrap-{$context}", function ( $output, $original_output ) use ( $context ) { | |
$position = ( 'open' === $original_output ) ? 'before' : 'after'; | |
ob_start(); | |
do_action( "{$position}_genesis_{$context}_wrap" ); | |
if ( 'open' === $original_output ) { | |
return ob_get_clean() . $output; | |
} else { | |
return $output . ob_get_clean(); | |
} | |
}, 10, 2 ); | |
} | |
} | |
add_hooks_outside_structural_wraps(); | |
// Here is where I'm trying to get it to display | |
add_action('before_genesis_site-inner_wrap', 'smg_logos_row' ); | |
function smg_logos_row() { | |
if(function_exists('smg_logo_display') && is_home() ) { | |
return smg_logo_display(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment