[Resolved] Can I output the logo defined in the customized with a PHP function?

Home Forums Support Can I output the logo defined in the customized with a PHP function?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #967804
    Paul

    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
    
    }
    #968206
    Tom
    Lead Developer
    Lead Developer

    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!

    #970346
    Paul

    Tom you Legend!
    Thanks 🙂

    I’ll try this!

    Must catch up soon 🙂

    #970565
    Tom
    Lead Developer
    Lead Developer
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.