Archived topic
Can I output the logo defined in the customized with a PHP function?
3 replies · Started by Paul on July 26, 2019
Hi there guys :)
We use a custom flyout in our GP starter theme. And we always have to manually update the logo in it.
And we decided today to make it better - and we failed :p
See below our function, and what would be great...would be if the image that outputs in here, could be automatically the same as the logo chosen in customizer.
Is it possible?
No problemo if it's not :)
Cheers
Paul
add_action( 'generate_inside_slideout_navigation','generate_slideout_navigation_logo' );
function generate_slideout_navigation_logo()
{
?>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img class="slideout-nav-logo" src="" alt="" /></a>
<?php
}
Hey Paul :)
Give this a shot:
add_action( 'generate_inside_slideout_navigation', function() {
if ( function_exists( 'generate_construct_logo' ) ) {
generate_construct_logo();
}
} );
That should do the trick!
Tom you Legend!
Thanks :)
I'll try this!
Must catch up soon :)
Definitely :)